我有这样的路由
{
path: ':fundHouseName',
pathMatch: 'full',
children: [{
path: RoutePaths.funds,
component: FundsComponent,
canActivate: [AuthGuard]
}]
},
{
path: '',
children: [{
path: RoutePaths.funds,
component: FundsComponent,
canActivate: [AuthGuard]
}]
},
我想要的是这条路由应该与参数路由(第一条路由)相匹配
https://localhost:4200/Kotak/funds
并且这应该与非参数的路由(第二条路由)相匹配
https://localhost:4200/funds
个
但是这两条路由都与参数1匹配,而我在参数路由上设置了pathMatch:'full'
,因此我的理解是,在路由满之前,它不应该与参数路由匹配,也就是说,路由应该有:fundHouseName
部分,然后是funds
部分,因此基本上路径必须是这样的满路径
XYZ/funds
个
我对pathMatch
的理解错了吗?
我如何才能做到这一点呢?