I have a side nav and within the side nav i have named router outlet. I am trying to assign the "aside" named router outlet to a sub component called "top-words-aside". However, it cannot find the url segment.
reports.component.html
<mat-sidenav #rightsidenav position="end" fixedInViewport="fixed">
<router-outlet name="aside"></router-outlet>
</mat-sidenav>
reports.routing.module.ts
const routes: Routes = [
{
path: '',
component: ReportsComponent
},
{
path: ':id',
component: ReportDetailComponent,
resolve: {
job: JobResolver,
report: ReportResolver,
activity: ActivityResolver,
},
children: [
{path: 'top-words-aside', component: TopWordsAsideComponent, outlet: 'aside'},
]
}
];
reports.component.ts
open() {
this.rightSideNavService.open();
this.router.navigate([{ outlets: { aside: ['top-words-aside'] }}]);
}
However i get the following error.
ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'top-words-aside' Error: Cannot match any routes. URL Segment: 'top-words-aside'