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

Cannot use components as content for modals in lazy loaded modules #947

Closed
TVrijdag opened this issue Oct 22, 2016 · 5 comments
Closed

Cannot use components as content for modals in lazy loaded modules #947

TVrijdag opened this issue Oct 22, 2016 · 5 comments

Comments

@TVrijdag
Copy link

Bug description:

The feature to open components as content for modals does not work in lazy loaded modules.
The plunker below throws the error: No component factory found for NgbdModalContent

Link to minimally-working plunker that reproduces the issue:

http://plnkr.co/edit/O8bkySFwvCS1zt9emQSV?p=preview

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 2.1.0

ng-bootstrap: 1.0.0-alpha.9

Bootstrap: 4.0.0-alpha.4

@pkozlowski-opensource
Copy link
Member

Oh, I see what is going on - it turns out that a lazy loaded module gets its own ComponentFactoryResolver and we are always using one from the root module.

It will require a bit of code reshuffling to fix but should be resolved in alpha.10.

@pkozlowski-opensource
Copy link
Member

pkozlowski-opensource commented Oct 27, 2016

OK, got a fix for this one, preparing a PR: http://plnkr.co/edit/MKaDi6U55qXKNMjAQPBP?p=preview

@jscharett
Copy link

This appears to be broken again? The plunker example no longer opens a dialog. Has anyone been able to open a component from a lazy loaded module? Is this an issue with Angular itself? 14324

@jscharett
Copy link

The plunker example on 1220 seems to work, but I am still unable to get this working on my local. Using Angular 4.4.3 and ng-bootstrap 1.0.0-beta.5

@jscharett
Copy link

Nvrmind. After digging in a bit, it appears to be working, just not visible. Believe it to be an CSS issue with the in house bootstrap theme my company uses.

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

3 participants