小编Tia*_*ira的帖子

找不到组件工厂...打开模态框

我有一个页面应该加载到模式中,该页面是其他页面的子页面(我认为这并不重要,但是......)重点是,当我尝试创建模式时,我收到以下错误

ERROR Error: Uncaught (in promise): Error: No component factory found for TarefasDetalhePage. Did you add it to @NgModule.entryComponents?
Run Code Online (Sandbox Code Playgroud)

但是,当我转到 AppModule 将该页面放入 EntryComponents 时,我收到此错误:

Component TarefasDetalhePage is not part of any NgModule or the module has not been imported into your module.
Run Code Online (Sandbox Code Playgroud)

模态的调用位于我的 HomePage.ts 上:

  async showModal(id){
    const modal = await this.modalController.create({
     component: TarefasDetalhePage,
     componentProps:{
       custom_id: id
     }
    });
    modal.present();
  }
Run Code Online (Sandbox Code Playgroud)

这是标记:

    <ion-list *ngIf="interna === true" >
    <ion-item (click)="showModal(tarefa.id)"   routerDirection="forward" detail *ngFor="let tarefa of tarefasInternas" class="in-list item ion-focusable item-label hydrated"> …
Run Code Online (Sandbox Code Playgroud)

javascript typescript ionic-framework angular

5
推荐指数
1
解决办法
2675
查看次数

自定义组件 IONIC 4

我有一个 ionic 应用程序并为其创建了一个自定义组件,ion-navbar但是,如何在我的所有页面中使用该组件?如果我在所有页面上都声明他,我会收到此错误

在此处输入图片说明

在此处输入图片说明

如果你想要https://github.com/tiagosilveiraa/PManager,这是我的 Github

javascript components typescript ionic-framework angular

2
推荐指数
1
解决办法
2882
查看次数