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

K.S*_*.S. 5 c# npm angularjs visual-studio-2015 ag-grid

有人可以分享将ag-grid添加到Visual Studio 2015 c#项目的步骤吗?我尝试了"npm install ag-grid",它在我的项目文件夹中创建了node_modules/ag-grid,但它没有将它添加到解决方案中.如果我将node_modules文件夹添加到解决方案,并尝试重建,我会收到错误:

"构建:除非提供'--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"

在此输入图像描述

Par*_*osh 0

在您的项目中开始使用 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>
Run Code Online (Sandbox Code Playgroud)