Angular2 router in one component

前端 未结 1 1175
萌比男神i
萌比男神i 2020-12-12 06:53

I write Angular2 app with router like /main /item . App have a lot of filter tables/trees/combobox. I want in /main page open bootstrap modal window (for example call @compo

相关标签:
1条回答
  • 2020-12-12 07:40

    You can define routes to show components in a named <router-outlet>

    Route config

    {path: '/chat', component: ChatCmp, outlet: 'aux'}
    

    Named router outlet

    <router-outlet name="aux">
    

    Navigate aux routes

    this._router.navigateByUrl("/crisis-center(aux:chat;open=true)");
    

    It seems navigating aux routes from routerLink is not yet supported

    <a [routerLink]="['/team/3(aux:/chat;open=true)']">Test</a>
    

    I have not tried this yet

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