【发布时间】:2019-02-08 09:19:50
【问题描述】:
我有一个component,它渲染了一些子路由,但布局不同 - 我们可以为两种布局使用相同的路径名,如下所示
{
path: '',
component: LandingComponent,
children: [
{ path: '', component: LandingpageComponent },
{ path: 'landingpage', component: LandingpageComponent },
]
},
{
path: '',
component: DashboardComponent,
children: [
{ path: 'patients', component: PatientsComponent },
{ path: 'endrolPatient', component: ProfileComponent },
{ path: 'endrolPatient/:id', component: ProfileComponent },
]
}
在上面的示例中,路径名称是相同的 - 当我运行应用程序时,我可以看到输出 - 角度如何处理这种关闭路由。
【问题讨论】: