导航到Angular 6中的子路由器出口

时间:2019-03-22 08:22:07

标签: angular angular-ui-router

我具有以下路线结构

{
    path: 'reports',
    component: ReportTypeSelectorComponent,
    children: [
      {
        path: 'infrastructure',
        component: InfrastructureComponent,
        outlet: 'report',
        children: [
          { path: '', component: Duplicate, outlet: 'infrastructure' },
          { path: 'static', component: Static, outlet: 'infrastructure' },
          { path: 'change', component: Change, outlet: 'infrastructure' }
        ]
      }
    ]
  }

如您所见,当我浏览到 / reports /(report:infrastructure)加载的组件时,我已将路由器出口“ report”命名为嵌套的路由器出口“ infrastructure” ,这是预期行为。但是,如何导航到“静态”或“更改”组件?我想不明白。例如 / reports /(report:infrastructure)/(infrastructure:static)不起作用。

0 个答案:

没有答案