First of all let me mention that below mentioned is simplified example of my all routes. Just the part that is not working. I have an angular project (it's nativescript angular project actually, but I guess the problem is in angular actually). The version of angular used is 8.2.x.
I have following app-routing.module.ts
, which basically redirects everything to HomeModule
:
const routes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', loadChildren: () => import('~/app/home/home.module').then((m) => m.HomeModule) }
];
Then comes home-routing.module.ts
, which has following in it:
const routes: Routes = [
{
path: '',
component: HomeComponent,
children: [
{
path: '',
component: Outlet1Component,
outlet: 'outlet1',
},
{
path: '',
component: Outlet2Component,
outlet: 'outlet2',
},
],
},
];
Now HomeComponent
is successfully loaded and it has several named outlets in it and I want those outlets also to load their own components, that are configured in router. But that part is not working and I don't now how to fix that.
UPDATE
Here are 2 Nativescript playground examples:
The first version works correctly (per angular logic) and loads the components for outlets. The second version doesn't load the components for outlets.
Also nativescript repo issue for reference.