路由下的路由 - 角2
问题描述:
我有一个名为SMS的子组件的仪表板组件。现在,SMS组件也有它的路由列表。我如何路由在仪表板组件下的sms导航栏下。当我在短信栏下路由时,短信的导航栏不应该消失。以下是截图。 在我的代码中,当我点击quicksms时,它将我路由到quicksms页面,导航栏消失。路由下的路由 - 角2
答
有没有必要的短信路线。这应该工作得很好!
仪表盘路线
export const DashboardRoutes: Routes =[
{
path: 'dashboard',
component: DashboardComponent,
children: [
{path:'messages', component: MessageComponent,canActivate: [AuthGuard]
children:[
{
path:'transactional', component:quickSmsComponent
}
]
},
]
}
];
见http://stackoverflow.com/questions/39112891/angular-2-rc5-router-outlet-inside-another-router-outlet –