为什么带有子路由的父路由之间不能相互跳?其他的跳路由时正常。
这是我的代码:
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:
日期和时间
网络
视频
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
routerLink不应该把相对路径以/开头写全吗?
angular2,有没有教程,想学来着。