我有2个网点:
<router-outlet></router-outlet>
<router-outlet name="popup"></router-outlet>
和路线:
const routes = [
{ path: '', component: HomeComponent },
{ path: 'user', component: UsersComponent },
{ path: 'user', component: UsersComponent, outlet: 'popup'}
];
为主要和弹出网点输出UsersComponent应该是什么routerLink?
答案 0 :(得分:1)
你应该写
<a [routerLink]="[{outlets: {primary: 'user', popup: 'user'}}]">Open Chat1</a>