我正在尝试在AG-GRID项目中使用材料组件。
我尝试根据网站示例here
导入相关内容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'.
我已按照here的说明安装了农业网格社区和角度
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
我的app.module.ts具有以下导入:
import { AgGridModule } from 'ag-grid-angular';
我没有使用SystemJS。
我已经尝试过,当我尝试像这样直接从“ ag-grid-community”导入时
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中导入更多内容? 我在这里做的事真的很蠢吗?
谢谢
答案 0 :(得分:1)
我不知道您要做什么,只是从导入中删除Module
和AllCommunityModules
。
ag-grid-community
没有导出的成员Module
。 ag-grid-community
没有导出的成员AllCommunityModules
。
import { GridOptions } from 'ag-grid-community';