有人可以分享在将ag-grid添加到Visual Studio 2015 c#项目中的步骤吗?我尝试了“ npm install ag-grid”,它在我的项目文件夹中创建了node_modules / ag-grid,但是没有将其添加到解决方案中。如果我将node_modules文件夹添加到解决方案中,并尝试重建,则会收到错误:
“ Build:除非'--module'标志为提供。C:\ SVN \ SolutionName \ ProjectName \ node_modules \ ag-grid \ dist \ lib \ entities \ rowNode.d.ts 5“
和
“内部版本:装饰器的实验性支持是在将来的版本中可能会发生变化。指定'--experimentalDecorators'删除此警告。C:\ SVN \ SolutionName \ ProjectName \ node_modules \ ag-grid \ src \ ts \ cellNavigationService.ts“
Get Started with ag-Grid in Your Project-链接将帮助您开始使用ag-grid。似乎您正在使用.Net MVC,因此您需要使用它的JavaScript版本。
来自index.html的参考js和CSS文件:Doc Reference,无需npm install
<head>
<script src="https://unpkg.com/ag-grid-community/dist/ag-grid-community.min.noStyle.js"></script>
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community/dist/styles/ag-grid.css">
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community/dist/styles/ag-theme-balham.css">
</head>