我有以下路由:
export const routes: Routes = [
{
// allowed for user with token
path: 'admin', component: AdminMainComponent,
canActivate: [authGuard],
children: [
{
path: 'products',
component: AdminProductListComponent,
children: [
{path: 'create', component: AdminCreateProductComponent},
]
},
{
path: 'categories',
component: CategoryListComponent,
children: [
{path: 'create', component: CreateCategoryComponent}
]
},
]
},
...
];
当我访问/admin/products/create
时,我看到了AdminProductListComponent
的内容.同样的问题是分类.怎么了?