AG-GRID 使用不带 SystemJS 的材料组件



我正在尝试在我的AG-GRID项目中使用材质组件。

我尝试按照这里的网站示例导入相关内容

import {GridOptions, Module, AllCommunityModules} from "@ag-grid-community/all-modules";

但是,这会引发以下错误:

ERROR in src/app/components/shot/shot-list/shot-list.component.ts(33,56): error TS2307: Cannot find module '@ag-grid-community/all-modules'.

我已经按照这里的说明安装了 ag 网格社区和角度

npm install --save ag-grid-community ag-grid-angular

我已经检查了npm列表,它提供了以下安装的版本:

+-- ag-grid@18.1.2
+-- ag-grid-angular@23.0.3
+-- ag-grid-community@23.0.2

My app.module.ts 具有以下导入:

import { AgGridModule } from 'ag-grid-angular';

我没有使用SystemJS。

我已经进行了实验,当我尝试直接从"农业网格社区"导入时,就像这样

import { GridOptions, Module, AllCommunityModules } from 'ag-grid-community';

它会引发以下错误:

ERROR in shot-list.component.ts(32,31): error TS2305: Module '"C:/Users/............/ag-grid-community/main"' has no exported member 'AllCommunityModules'.

我是否需要在我的 app.modules.ts 中导入更多内容? 我在这里做什么非常愚蠢的事情吗?

谢谢

我不知道你想做什么,但只是从导入中删除ModuleAllCommunityModules

  • ag-grid-community没有导出的成员Module
  • ag-grid-community没有导出的成员AllCommunityModules

    import { GridOptions } from 'ag-grid-community';
    

最新更新