在根级别路由上重用子模块中的angular2组件

时间:2017-05-31 03:40:22

标签: angular angular2-routing

我有以下路线结构

export const ROUTES: Routes = [
 { path: '', component: SignInComponent },
 {
      path: 'dashboard',
      component: BaseComponent,
      canActivate: [AuthGuard],
      children: [
        { path: '', component: DashboardPageComponent },
        {
          path: 'greenscreens', loadChildren: './+child/child.module#ChildModule'
        }
      ]
   },
   { path: 'greenscreen/:id', component:  ViewChildComponent },
   { path: '**', component: NoContentComponent }
];

我想从根级别路由'greenscreen/:id'上的ChildModule访问一个组件。我可以在不使用共享模块的情况下完成此操作

0 个答案:

没有答案