shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 242 forks source link

Error: No component factory found for BSModalContainer #365

Closed kadosh1000 closed 7 years ago

kadosh1000 commented 7 years ago

When opening a custom modal using the following code: this.modal.open(ModalComponent, overlayConfigFactory({},BSModalContext))

I get the following error:

Error: No component factory found for BSModalContainer. Did you add it to @NgModule.entryComponents?

The modal indeed opens and displayed well, but I would like to get rid of that error message.

Have anyone encountered that error before?

shlomiassaf commented 7 years ago

Version?

Sent from my iPhone

On Jun 20, 2017, at 9:06 PM, kadosh1000 notifications@github.com wrote:

When opening a custom modal using the following code: this.modal.open(ModalComponent, overlayConfigFactory({},BSModalContext))

I get the following error:

Error: No component factory found for BSModalContainer. Did you add it to @NgModule.entryComponents?

Have anyone encountered that error before?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

kadosh1000 commented 7 years ago

@shlomiassaf sorry forgot to mention. I am using angular 4.0.2 and angula2-modal 3.0.0

shlomiassaf commented 7 years ago

Lazy loading by chance ?

Sent from my iPhone

On Jun 20, 2017, at 10:52 PM, kadosh1000 notifications@github.com wrote:

@shlomiassaf sorry forgot to mention. I am using angular 4.0.2 and angula2-modal 3.0.0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

kadosh1000 commented 7 years ago

Nope :(

kadosh1000 commented 7 years ago

found what the problem was. I didn't notice I need to import the BootstrapModalModule. After importing it the error went away