为什么带有子路由的父路由之间不能相互跳?其他的跳路由时正常。
这是我的代码:
export const MainRoutes:RouterConfig=[ {path: 'static/setting', component: Setting,children:[ {path: '', redirectTo: 'network', terminal: true}, {path: 'network', component: SettingNetwork}, {path: 'date', component: SettingTimeAndDate}, {path: 'video', component: SettingVideo} ]}, {path: 'static/deployment', component: Deployment}, {path: 'static/real_time_results', component: RealTimeResults}, {path: 'static/whitelists', component: WhiteLists,children:[ {path: '', redirectTo: 'recognition', terminal: true}, {path: 'recognition', component: Recognition}, {path: 'white', component: White}, {path: 'black', component: Black } ]}, ]
seedApp html:
seedApp ts:
private menus=[ {name:'实时结果',address:'/static/real_time_results'}, {name:'部署设置',address:'/static/deployment'}, {name:'白名单',address:'/static/whitelists'}, {name:'设置',address:'/static/setting'}, ];
setting html:
angular2,有没有教程,想学来着。
routerLink不应该把相对路径以/开头写全吗?