I'm trying to load components dynamically in modal.
I've added my dynamic components in app-module entryComponents:
@NgModule({
imports: [
myDynamicComponent
],
entryComponents: [
myDynamicComponent]
})
and I'm calling component so
const componentFactory =
this.componentFactoryResolver.resolveComponentFactory(AppConstants.dynamicComponents['AComponentType']);
let options: NgbModalOptions = { size: 'xl' };
let modalRef = this.characteristicsModal.open(componentFactory, options);
I get error No component factory found for [object Object]. Did you add it to @NgModule.entryComponents?