I have a lazy loaded module which includes named router-outlet (auxiliary routes). I'm not able to target content into this router. The path match and I can see it in the url but the content doesn't appear.
Here is a code example: Stackblitz
==== UPDATE
The code is fixed.
Usage:
- click on the "LOAD SUBMODULE" link
- submodule loads
- click on any lines above of "SUBMOD loaded" title.
CodePudding user response:
When you are using a router outlet inside a component the child routes needs be declared as children for the parent route.
This is how your submod routes should look like
{
path: '',
component: SubmodComponent,
children: [
{ path: 'toloadin', outlet: 'suboutlet', component: ToLoadinComponent },
],
}