EntryComponents in Module for LazyLoading

后端 未结 4 937
广开言路
广开言路 2020-12-31 03:42

I want to load a modal from a component. In Angular Material documentation is write to add the modal component in entryComponents :

This :

@NgModule         


        
4条回答
  •  Happy的楠姐
    2020-12-31 04:00

    We had the same or a very similar issue with Angular Bootstrap and a modal popup. Our first finding was, that if we import the lazy loaded module into our app-moule the popup worked. In the end, we had to

    ... add NgbModule to the imports of the @NgModule decorator of the module the popup was a part of,

    although we have NgbModule already imported in the app-module and no import was missed by the compiler in the ts file of the popup component.

    I hope this can help someone. Please be kind.

提交回复
热议问题