是的,这是可能的,你可以使用,出口功能提供的角,下面是一个伪例子。
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
<div class="container-fluid">
<div class="row d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3">
<div class="col-12">
<router-outlet name="left"></router-outlet>
</div>
</div>
<div class="row d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3">
<div class="col-12 sm-12 md-12 xs-12 lg-12">
<router-outlet name="right"></router-outlet>
</div>
</div>
</div>
</main>
在路由文件中-
const appRoutes: Routes = [{
path: '', redirectTo: 'processi', pathMatch: 'full',
children: [
{ path: '', component: TeamDashboardComponent, outlet: 'left' },
{ path: '', component: ChatroomComponent, outlet: 'right' }
]
},
. . .
. . . .
. . . . .
}]
如果你对此有任何疑问,请告诉我……