【问题标题】:how to install ag-grid in Visual Studio 2015?如何在 Visual Studio 2015 中安装 ag-grid?
【发布时间】:2016-08-19 11:42:51
【问题描述】:

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

【问题讨论】:

  • 找到解决方案了吗?

标签: c# angularjs visual-studio-2015 npm ag-grid


【解决方案1】:

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>

【讨论】:

    猜你喜欢
    • 2015-03-15
    • 1970-01-01
    • 1970-01-01
    • 2018-12-30
    • 1970-01-01
    • 2018-01-23
    • 1970-01-01
    • 1970-01-01
    • 2016-07-09
    相关资源
    最近更新 更多