Node.js 找不到EmailInstructorsComponent的组件工厂。您是否将其添加到@NgModule.entryComponents?

Node.js 找不到EmailInstructorsComponent的组件工厂。您是否将其添加到@NgModule.entryComponents?,node.js,angular,typescript,ecmascript-6,single-page-application,Node.js,Angular,Typescript,Ecmascript 6,Single Page Application,我正在使用ngx管理模板。现在,我正试图创建一个模式,将打开一个按钮点击。我试图在模式窗口中显示表单,但单击后,模式确实打开,但它不显示表单,我收到此错误 找不到EmailInstructorsComponent的组件工厂。您是否将其添加到@NgModule.entryComponents 我使用的是lazy laoding,大多数模块都已添加到shared.module文件的声明中,以避免在生产过程中出现错误。 我也试图查看stackoverflow上的其他链接,但没有一个链接指向模式窗口/对

我正在使用ngx管理模板。现在,我正试图创建一个模式,将打开一个按钮点击。我试图在模式窗口中显示表单,但单击后,模式确实打开,但它不显示表单,我收到此错误

找不到EmailInstructorsComponent的组件工厂。您是否将其添加到@NgModule.entryComponents

我使用的是lazy laoding,大多数模块都已添加到shared.module文件的声明中,以避免在生产过程中出现错误。 我也试图查看stackoverflow上的其他链接,但没有一个链接指向模式窗口/对话框,这就是为什么我必须创建这个单独的线程

classes-and-students.module.ts文件

const ENTRY_COMPONENTS = [
    EmailInstructorsComponent
  ];


@NgModule({
    imports: [
        ClassesAndStudentsRoutingModule,
        NbCardModule,
        Ng2SmartTableModule,
         NbAlertModule,
        SharedModule,
        CKEditorModule
    ],
    declarations: [
        ClassesAndStudentsComponent,
        ...routedComponents,
        InstructorbiddingComponent,
        EmailInstructorsComponent,
    ],
    entryComponents: [
        ...ENTRY_COMPONENTS
    ],
    providers: [
        NewsService,
    ],
})
export class ClassesandStudentsModule { }
instructorbidding.component.ts文件

@Component({
  selector: 'ngx-instructorbidding',
  templateUrl: 'instructorbidding.component.html',
  styleUrls: ['instructorbidding.component.scss']
})
export class InstructorbiddingComponent {

  @ViewChild('contentTemplate', { static: true }) contentTemplate: TemplateRef<any>;
  @ViewChild('disabledEsc', { read: TemplateRef, static: true }) disabledEscTemplate: TemplateRef<HTMLElement>;


  constructor(private windowService: NbWindowService) { }

  openWindowForm(contentTemplate) {
    this.windowService.open(EmailInstructorsComponent, { title: 'Window'});
  }

}
@Component({
  selector: 'ngx-email-instructors',
  templateUrl: './email-instructors.component.html',
  styleUrls: ['./email-instructors.component.scss']
})
export class EmailInstructorsComponent {

  constructor(public windowRef: NbWindowRef) { 

  }
  close() {
    this.windowRef.close();
  }

}
email-instructors.component.html文件

<form class="form">
   <label for="subject">Subject:</label>
   <input nbInput id="subject" type="text">

   <label class="text-label" for="text">Text:</label>
   <textarea nbInput id="text"></textarea>
</form>

主题:
正文:

我不确定我犯了什么错误,所以请帮我指出我的错误

试着像这样更改代码,看看它是否有效

const ENTRY_COMPONENTS = [
    EmailInstructorsComponent
  ];


@NgModule({
    imports: [
        ClassesAndStudentsRoutingModule,
        NbCardModule,
        Ng2SmartTableModule,
         NbAlertModule,
        SharedModule,
        CKEditorModule
    ],
    declarations: [
        ClassesAndStudentsComponent,
        ...routedComponents,
        InstructorbiddingComponent,
        EmailInstructorsComponent,
    ],
    entryComponents: [
        ENTRY_COMPONENTS
    ],
    providers: [
        NewsService,
    ],
})
export class ClassesandStudentsModule { }

您可以参考上面的链接,看看是否有任何答案可以解决您的问题。@NicholasK我已经看到了这个链接,但它没有解决我的问题,这就是为什么我为自己的代码创建了一个单独的线程