-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
DIalogInjector and lazy-loaded modules Injectors #1765
Comments
Thank you for your excellent bug report. |
@jelbourn Any tips on how to circumvent this? Just recently stumbled uppon this problem. Shame its unlikely i can help fixing it. |
@karolmie1 I had to give up lazy loading until the issue is resolved |
@eagle-dan1349 I think the next release will fix this- we're getting rid of |
Excellent! It works with the latest bits given that you are also importing MaterialModule in the lazy loaded sub-module. Thanks! |
@eagle-dan1349 can you close this issue please, the new way is always import material module without cc @jelbourn |
What about this with angular 8? |
@sebrojas14
In Angular 8, I solved the issue by adding ...
import { MatDialogModule } from '@angular/material/dialog';
...
@NgModule({
declarations: [ TheDialogComponent ],
imports: [
...,
MatDialogModule, // < Add this line!
...
],
entryComponents: [ TheDialogComponent ]
})
export class TheSubModule {} |
@DrewImm |
I can't confirm that this is the case 100%, but there is some discussion about how Ivy may improve upon this behavior in angular/angular#14324 (comment). |
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. |
Bug, feature request, or proposal:
[x] Bug
What is the expected behavior?
DialogInjector should be aware of Injector from lazy-loaded module
What is the current behavior?
DialogInjector is unaware of lazy-loaded module and attempts to inject services provided by lazy-loaded module result in 'No provider for ...' errors
What are the steps to reproduce?
Plunker template: http://embed.plnkr.co/eBQNsfV7jTys4THqfT77/
What is the use-case or motivation for changing an existing behavior?
I try to split my app into lazy-loaded modules.
Which versions of Angular, Material, OS, browsers are affected?
Angular: ~2.1.0
Material: ^2.0.0-alpha.9-3
The text was updated successfully, but these errors were encountered: