Angular 7延迟加载,子路由始终加载第一条路由

时间:2019-02-20 13:56:15

标签: routing lazy-loading angular7

我在模块中定义了我的延迟加载的子路由,如下所示...注意到无论我导航到哪个路由,都将加载第一个子(1004D)。有人遇到过这个吗?

  const reviewRoutes: Routes = [
{ path: ''
  , component: ReviewComponent
  , children: [
    { path: ':1004D', pathMatch: 'full', loadChildren: 'src/app/components/forms/1004D/form-1004d.module#Form1004DModule'},
    { path: ':1004P', pathMatch: 'full', loadChildren: 'src/app/components/forms/1004P/form-1004p.module#Form1004PModule'},
    { path: ':1004C', pathMatch: 'full', loadChildren: 'src/app/components/forms/1004C/form-1004c.module#Form1004CModule'},        
    { path: ':1004',  pathMatch: 'full', loadChildren: 'src/app/components/forms/1004/form-1004.module#Form1004Module'},        
  ]
}

];

0 个答案:

没有答案