3
votes

When I try to load a module using loadChildren to load a module's component in named outlet, its throwing error.

Is there a way to lazy load module in a named router-outlet?

//html
<router-outlet name="manager"></router-outlet>

//routing
loadChildren: 'app/xxxmodule/thisxxx.module#ManagerModule'
1
I just ran into this today, it looks like it's still an issue: github.com/angular/angular/issues/12842ChadF
yes, I managed it with some work aroundsAniruddha Das
What were your work arounds?ChadF
i left using named outlet nad handling my component loading in [hidden] conditionsAniruddha Das
check this answer for workaround or possible solution-stackoverflow.com/questions/47482230/…mohit uprim

1 Answers

0
votes

Before Angular 11 this was a bug in angular and was not possible. For reference find github issue link below :-

https://github.com/angular/angular/issues/12842

Its fixed in angular 11 and changelog of angular 11 confirms that. please find the link below of changelog and search 12842 in changelog page.

https://github.com/angular/angular/blob/master/CHANGELOG.md