为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

白板的微信 2018-10-24 09:17:32
angular5 视图嵌套时如何指定二级视图显示默认页面const routes: Routes = [{path: 'platform', component: PlatformComponent, children: [   {     path: 'pl01',     component: Pl01Component   },   {    path: 'pl02',     component: Pl02Component   },   {    path: 'pl03',     component: Pl03Component   } ]},]没有默认的页面,默认显示空白,请问怎么设置默认的页面呢?非常感谢
查看完整描述

1 回答

?
撒科打诨

TA贡献1934条经验 获得超2个赞

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

查看完整回答
反对 回复 2018-10-24
  • 1 回答
  • 0 关注
  • 733 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号