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
Lazy Loaded Module does not work with lazy routing #19520
Comments
This issue is really anoying |
Duplicate with #10981 |
@Jonathan002 ... use the equivalent solution like described here by using |
Closing as a duplicate as well as needing a reproduction (use Plunker or Stackblitz). If you would would like to create a repro that's different than #10981 and not solved by the referenced stackblitz above, please create a new issue. |
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. |
I'm submitting a...
Current behavior
Problem: I have a lazy module that needs to use the app popup router (secondary named outlet) in my app.component.html.
Expected behavior
Lazy module can use the popup router in my app.component.html.
Minimal reproduction of the problem with instructions
I have the following in my app component template:
src/app/app.component.html
My App Module and it's routes:
/src/app/app-routing.module.ts
/src/app/app.module.ts
My Lazy Module and it's routes:
/src/app/lazy/lazy.module.ts
/src/app/lazy/lazy.module.ts
How I navigate:
I navigate to the route like this:
/src/app/lazy/lazy.component.html
I can't seem to get it to work as I get this error:
Note that this works perfectly though if I import the LazyModule in AppModule below:
Although this defeats the purpose of it being a lazy loaded module. So how can I get the lazy loaded module use the secondary router-outlet named 'app-popup' that exist in the app components html template?
What is the motivation / use case for changing the behavior?
Getting a lazy module to use a single app wide secondary outlet as a popup.
Environment
Angular-Cli project
The text was updated successfully, but these errors were encountered: