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

5

有人能够分享如何将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”

“Build:装饰器的实验性支持是一个可能会在未来版本中发生变化的功能。指定'--experimentalDecorators'以消除此警告。C:\ SVN \ SolutionName \ ProjectName \ node_modules \ ag-grid \ src \ ts \ cellNavigationService.ts”

enter image description here


1
你找到解决方案了吗? - JGV
1个回答

0

在您的项目中开始使用ag-Grid - 链接将帮助您开始使用。看起来您正在使用.Net MVC,因此您需要使用JavaScript版本。

从index.html引用js和CSS文件:文档参考, 无需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>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接