如何在Visual Studio 2015中安装ag-grid?

问题描述 投票:5回答:1

有人可以分享在将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“

enter image description here

c# angularjs visual-studio-2015 npm ag-grid
1个回答
0
投票

Get Started with ag-Grid in Your Project-链接将帮助您开始使用。似乎您正在使用.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>
© www.soinside.com 2019 - 2024. All rights reserved.