My modules are set up like this, this is the config I am used to from classic Angular:
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes),
CreateBookingModule
],
declarations: [PlaceDetailPage],
entryComponents: [CreateBookingComponent]
})
export class PlaceDetailPageModule {}
@NgModule({
declarations: [CreateBookingComponent],
exports: [CreateBookingComponent],
imports: [
CommonModule,
FormsModule,
IonicModule,
]
})
export class CreateBookingModule { }
Unfortunately, when inside PlaceDetailPage and activating the Modal which is supposed to render CreateBookingComponent, I get the error:
Error: No component factory found for CreateBookingComponent. Did you add it to @NgModule.entryComponents?
It only works if I have no CreateBookingModule at all and declare the component directly in PlaceDetailPageModule; but then I cannot use it in another component because a Component cannot be declared twice.