【发布时间】:2018-04-22 11:38:57
【问题描述】:
我有名为“个人资料”的父路由,在里面我有子路由,如基本、公司、联系人。所以当我点击像 Profile 这样的父路由时,默认情况下它应该显示基本组件中存在的内容。
export const appRoutes: Routes = [
{ path: 'profile', component: ProfileComponent,
children: [
{
path: 'basic',
component: BasicComponent,
pathMatch: 'full'
},
{
path: 'company',
component: CompnayComponent
},
{
path: 'contacts',
component: ContactsComponent
},
{
path: 'compliance',
component: ComplianceComponent
}
]
}
所以当用户点击个人资料时,基本的内容应该会自动显示。那么如何实现呢?谁能帮帮我?
【问题讨论】: