小编Ara*_*per的帖子

pathMatch 路由错误

错误:路由 '{path:"teams/", redirectTo:"all"}' 的配置无效:请提供 'pathMatch'。'pathMatch' 的默认值是 'prefix',但通常意图是使用 'full'。

这是错误按摩。

这是我在 app.module.ts 上的语法:

 const routes = [
 { path: 'teams', component: TabsComponent, children: [
    { path: '', redirectTo: 'all', pathMacth: 'full' },
     { path: ':side', component: ListComponent }
     ] },
{ path: 'new-team', component: CreateTeamComponent },
{ path: '**', redirectTo: '/teams' }
Run Code Online (Sandbox Code Playgroud)

];

为什么我还是有错误??

angular angular-router

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

angular ×1

angular-router ×1