您好我的离子应用程序中有一个名为" MyCustomer"的页面。 MyCustomer页面具有以下IonicPage配置:
@IonicPage({
name: 'MyCustomer',
})
来自MyCustomer页面我将打开一个名为" CustomerEdit"在modal.So我已经在声明和条目组件中的MyCustomer页面模块文件中定义了CustomerEdit组件,下面是Page
的@NgModule代码import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { CommonModule } from '@angular/common';
import { MyCustomerPage } from './my-customer.page';
import { CustomerEdit } from '../../components/CustomerEdit/CustomerEdit';
@NgModule({
declarations: [
MyCustomerPage,CustomerEdit
],
imports: [
CommonModule,IonicPageModule,
IonicPageModule.forChild(MyCustomerPage),
],
entryComponents:[CustomerEdit]
})
export class MyCustomerPageModule {}
当我尝试像这样
打开模态中的CustomerEdit组件时 Open(){
let modal=this.modalCtrl.create(CustomerEdit);
modal.present();
}
我收到以下错误。
No component factory found for CustomerEdit. Did you add it to @NgModule.entryComponents?
有人可以告诉我,我在这里做错了什么吗?