一个页面有两个路由器出口(将来可能会更多)。我想为每个插座指定默认路线。这样做的角度方式是什么?
这是路由器配置:
const routes: Routes = [
{
path: '', component: StudyDetailsComponent, children: [
{ path: 'description', component: DescriptionComponent, outlet: 'de' },
{ path: 'design', component: DesignComponent, outlet: 'de' },
{ path: 'schema', component: SchemaComponent, outlet: 'de' },
{ path: 'pubmed', component: PubmedComponent, outlet: 'pmrn' },
{ path: 'related-news', component: RelatedNewsComponent, outlet: 'pmrn' },
]
},
];
我想在父路由处于活动状态时显示“说明”和“发布”组件。
更一般而言,如何为每个命名插座定义默认路线?