I have a question regarding a second (named) router-outlet. When clicking on the link the router-outlet doesn't show the component.
This is what my Routes looks like:
const appRoutes: Routes = [
{ path: '', redirectTo: '/projects', pathMatch: 'full' },
{
path: 'projects', children: [
{ path: '', component: ProjectsComponent },
{ path: ':projectId', children: [
{ path: '', component: ProjectDetailsComponent },
{ path: 'routes', component: RoutesComponent, outlet: 'project' },
{ path: 'rides/new', component: AddRideComponent, outlet: 'project' },
{ path: 'routes/:id', component: RideDetailsComponent, outlet: 'project' },
{ path: 'stops', component: StopsComponent, outlet: 'project' },
{ path: 'stops/new', component: AddStopComponent, outlet: 'project' },
{ path: 'stops/:id', component: StopDetailsComponent, outlet: 'project' }
]
},
]
},
...
];
This is what my named router outlet looks like:
<router-outlet name="project"></router-outlet>
This is what the routerLink looks like:
<a [routerLink]="['/projects', projectId, { outlets: {project: 'routes'}}]">Routes</a>
When I'm on http://.../projects/456
and click on the link the named router-outlet remains empty and doesn't show the component.
I've tried lots of things but can't seem to find the issue. What am I doing wrong?