0
嵌套路由我的路由配置如下角-2兩級
export const ProductRoutes: Route[] = [
{
path: 'product/:api_key',
component: ProductComponent,
children:[
{
path: 'productType', component: productTypesComponent,
// children:[
// { path: 'productEntry', component: productEntriesComponent }
// ]
},
],
canActivate: [CanActivateService]
}
];
它適用於兒童路線的一個水平,但是當我添加第二個級別的子productEntry
它停止工作,即使我的路由器配置顯示正確的孩子順序。
任何有用的資源,將不勝感激。由於
你得到任何錯誤? – ranakrunal9
請確保您已在第二級子級(productTypesComponent)上添加了router-outlet標記。 –
我收到錯誤:無法匹配任何路線:「產品/ blt1b502f126e0ddf02/productType」 .. 它的作品,如果我評論productEntry –