类型 LeadPage(Module) 是 2 个模块声明的一部分
Type LeadPage(Module) is part of the declarations of 2 modules
当我们在ionic-angular(same as a angular)
中使用modal
时,我们必须在最近的[=31中声明page/component =]
async onCreateLead() {
const modal = await this.mdlCntrl.create({
component: LeadPage
});
return await modal.present(); }
我必须在两个差异 Pages(Modules) 中使用上面的 lead component
。当我尝试在两个不同的 模块中使用“LeadPage
”时,会引发错误:
Type LeadPage is part of the declarations of 2 modules:
我该如何解决这个问题?
如果你想在多个页面中使用组件作为模型,你需要添加到更高的模块中。
并生成类似 map.component.ts 的组件并生成 share.module.ts 并在 share.module.ts 中导出 map.component.ts 然后在 App.module.ts 中导入 share.module.ts
并在 your.modue.ts 中导入 MapCompoent,如 entryComponents: [MapComponent];
当我们在ionic-angular(same as a angular)
中使用modal
时,我们必须在最近的[=31中声明page/component =]
async onCreateLead() {
const modal = await this.mdlCntrl.create({
component: LeadPage
});
return await modal.present(); }
我必须在两个差异 Pages(Modules) 中使用上面的 lead component
。当我尝试在两个不同的 模块中使用“LeadPage
”时,会引发错误:
Type LeadPage is part of the declarations of 2 modules:
我该如何解决这个问题?
如果你想在多个页面中使用组件作为模型,你需要添加到更高的模块中。
并生成类似 map.component.ts 的组件并生成 share.module.ts 并在 share.module.ts 中导出 map.component.ts 然后在 App.module.ts 中导入 share.module.ts
并在 your.modue.ts 中导入 MapCompoent,如 entryComponents: [MapComponent];