📜  设置样品表时遇到问题. “无法为 rowModelType 客户端找到匹配的行模型” - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:53.249000             🧑  作者: Mango

代码示例1
To solve this problem, I had to first import ModuleRegistry and AllCommunityModules in maint.ts
and add ModuleRegistry.registerModules(AllCommunityModules); below just before platformBrowserDynamic().bootstrapModule(AppModule) like:

import { ModuleRegistry, AllCommunityModules } from '@ag-grid-community/all-modules';


ModuleRegistry.registerModules(AllCommunityModules);
platformBrowserDynamic().bootstrapModule(AppModule)
 .catch(err => console.error(err));


Lastly, in the component (e.g. users.component.ts) I used it by importing the AllCommunityModules and declaring the variable like:

import { AllCommunityModules } from '@ag-grid-community/all-modules';


public modules: Module[] = AllCommunityModules;