How to render a grandchild view into the same router-outlet as the first child?

后端 未结 2 381
刺人心
刺人心 2021-01-20 23:13

This is a follow up question to this: Angular 2 how does auxiliary routes work in 2.1.0?

I also tried looking at this but it doesn\'t really shed any light on the issue:

相关标签:
2条回答
  • 2021-01-20 23:42

    This might sound crazy, but why not make dashboard a child module of admin?

    0 讨论(0)
  • 2021-01-20 23:45

    Try with:

    const routes: Routes = [
      {
        path: '',
        component: DashboardComponent,
        children: [
            {
                path: 'brands',
                loadChildren: '../pages/+brands/brands.module#BrandsModule'
            }
        ]
      }  
    ];
    

    and /admin/(admin:dashboard//brands)

    0 讨论(0)
提交回复
热议问题