angular5 ui-router 视图嵌套时如何指定二级视图显示默认页面

angular5 视图嵌套时如何指定二级视图显示默认页面
const routes: Routes = [

{
path: 'platform',
component: PlatformComponent,
children: [
  {
    path: 'pl01',
    component: Pl01Component
  },
  {
    path: 'pl02',
    component: Pl02Component
  },
  {
    path: 'pl03',
    component: Pl03Component
  }
]

},
]
没有默认的页面,默认显示空白,请问怎么设置默认的页面呢?非常感谢

阅读 1.5k
1 个回答

children: [
{path: '', redirectTo: 'pl01', pathMatch: 'full' },
{path: 'pl01',component: Pl01Component},
{path: 'pl02',component: Pl02Component},
{path: 'pl03', component: Pl03Component}
]

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进