-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Getting "No component factory" error while opening a Material Dialog in lazy loaded Component #8473
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
Comments
Have you checked #1491? |
Ya . But its not working for me . here is my code ( Not complete code) |
Can you please share your entire NgModule setup? |
@jelbourn Is there any way to fix this ? |
You need to import |
thanks a lot @jelbourn . it worked <3 |
Is this still the solution for this issue? Or has something else changed as of late? |
In regards to Angular v6+: in case anyone is using the |
@travtarr thanks so much for the answer.... I had that exact same issue. In short: If you the service building your component is only provided in Why does that need to be like this though? |
@travtarr "you'll need to instead provide that service in the providers array of the module where your dialog components are declared." this will declare a new instance of the service so it's not possible to have a singleton in the app to launch dialog ? |
@jingignoli I didn't clarify in my original post, but you'll want to remove the |
@travtarr Thanks for your answer but the service will be scoped to the module. |
@jingignoli Then you'll probably need to place your modal component declarations in a non-lazy-loaded module to avoid this issue. |
@travtarr this is not a solution for me :( Btw, thanks for your time :) |
@jingignoli have you addressed this issue? I have same issue as yours :( |
@min-w-park no i haven't created an issue for this, i don't know if it's a bug or a normal behavior. |
I have the same question about it,When I open lazyload module. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hi,
Im getting the following error when i try to open Material Dialog in
ConfirmBoxComponent
.I have already added ConfirmBoxComponent in entryComponents list
The module that contain ConfirmBoxComponent is loaded via Lazy loading technique.
I'm not sure this is bug or not.
I'm using latest version of Angular and Material
The text was updated successfully, but these errors were encountered: