我遇到了导航到大孩子路线的问题。大孩子的路径的默认路由工作。当我尝试导航到“文本”路线时,它无法识别路线。
我设置了以下路线:
{
path: '',
pathMatch: 'full',
component: EmailListComponent,
children:[
{
path: '',
component: EmptyComponent
}
]
},
{
path: 'editor',
pathMatch: 'full',
component: EmailListComponent,
children: [
{
path: '',
component: MessageEditorComponent,
children: [
{
path: 'text',
component: TextActionBarComponent,
},
{
path: '',
component: NoActionBarComponent,
}
]
},
]
}
我正在尝试使用以下方式导航此路线:
this.router.navigate(['/editor/text'], {});
我也试过
this.router.navigate(['text'], {});
和
this.router.navigate(['/text'], {});