这是我的路线:
const routes: Routes = [
{
path: 'authorization',
component: AuthorizationLayoutComponent,
children: [
{
path: 'login',
component: AuthorizationLoginComponent
},
{
path: 'advertiser',
canActivate: [AuthorizationGuard],
children: [
{
path: 'new-campaign',
component: AdvertiserNewCampaignComponent
}
]
}
]
},
{
path: 'advertiser',
canActivate: [AuthorizationGuard],
component: HomeLayoutComponent,
children: [
{
path: 'dashboard',
component: AdvertiserDashboardComponent,
},
}
目前,用户位于以下页面:/ advertiser / dashboard。他想要转到页面/授权/广告客户/新广告系列。因此,他点击了与routerLink =“/ authorization / advertiser / new-campaign”的链接,并成功将他移至此页面。但由于某些原因,布局AuthorizationLayoutComponent不加载,只有页面本身。为什么呢?