我的路由配置如下:
heroku create
我有一些可注射的服务,如下所示:
export const routes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full'},
{
path: "register",
component: Abc,
canActivate: [NotAuthGard]
},
{
path: "xyz",
component: Xyz,
canActivate: [AuthGard],
children: [
{ path: "xy1", component: XY1 },
{ path: "xy2", component: XY2 },
]
},
{ path: "pqr", component: Pqr, canActivate: [AuthGard] },
{ path: '**', component: PageNotFoundComponent },
];
当我使用activity.goto('xyz / xy1')进行路由或通过浏览器('/ xyz / xy1')进行加载时,它适用于根路由,但对于子路由,它仅重定向至本地。 / p>