3

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'
Aniruddha Das
  • 20,520
  • 23
  • 96
  • 132

1 Answers1

0

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

Aakash Garg
  • 10,649
  • 2
  • 7
  • 25