Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modal): BsModalService cannot instantiate the component from lazy-loaded module. #3353

Closed
zzJinux opened this issue Dec 24, 2017 · 2 comments

Comments

@zzJinux
Copy link

zzJinux commented Dec 24, 2017

Before opening an issue, please search for duplicates (opened and closed)
https://github.com/valor-software/ngx-bootstrap/issues
There's no need to open an issue here if you want to ask general question, use StackOverflow or Slack instead

Bug description or feature request:

BsModalService internally uses ComponentFactoryResolver, and BsModalService is designed to be provided to the root injector.
For current latest version (5.1.2) of angular, The CFR from the root cannot instantiate the component from lazy-loaded module. (See angular/angular#14324)

BsModalService should be able to handle this situation. By either adding a parameter that accepts CFR or implementing intermediate service which can retrieve proper CFR. (as used in ng-bootstrap)

Plunker/StackBlitz that reproduces the issue:

https://stackblitz.com/edit/ngx-bootstrap-playground-mtwpzg

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 2.0.0-rc.0

Angular: 5.1.2

Bootstrap: n/a

Build system: Angular CLI, System.js, webpack, starter seed:

@zzJinux
Copy link
Author

zzJinux commented Dec 25, 2017

I found that this issue is duplicate of /issues/2356.
Should I close this?

@IlyaSurmay
Copy link
Contributor

Yep, it's a duplicate of #2356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants