Problem
i am using ngx-Bootstrap from valor-software I want to open a modal by clicking a button in header component and pass NewEmailComponent that is located inside Email Module(LazyLoaded ) to its parameter as template
Template
<button (click)="openNewEmailInModal()">contact us </button>
code in ts file
openNewEmailInModal(){
this.bsModalService.show(NewEmailComponent,{class:'modal-md'});
}
But I get The Error
Error
No component factory found for NewEmailComponent . Did you add it to @NgModule.entryComponents?
current Set Up
But I have already Added it to the entryComponents of EmailModule.
Question?
so how can I access entryComponents of Lazyloaded modules when I need it.
What cant considered as solution
obviously moving NewEmaiComponetent to App Module is not the solution , because the application is big enough and mature, so moving it to require much refactoring.