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

Tia*_*ira 5 javascript typescript ionic-framework angular

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

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">
      <ion-label>
        <h2>#{{tarefa.numero}} - {{tarefa.descricao}}</h2>
        <h3>{{tarefa.inicio}} - {{tarefa.fim}}</h3>
        <p>{{tarefa.comentarios}}</p>
      </ion-label>
    </ion-item>
  </ion-list>
Run Code Online (Sandbox Code Playgroud)

这是我的结构:

在此输入图像描述

github 上的仓库: https: //github.com/tiagosilveiraa/PManager

Kul*_*mte 5

要在模态中打开 a component,您必须将 thecomponent添加app.module.jsentryComponent

你的error消息表明了这一点。