代码之家  ›  专栏  ›  技术社区  ›  cucuru

如何沟通两个出口

  •  1
  • cucuru  · 技术社区  · 7 年前

    我的应用程序中有两个路由器插座:

    app.component.html

    <my-component>
      <router-outlet name="header"></router-outlet>
    </my-component>  
    
    <router-outlet></router-outlet>
    

    当出现“导航”时,我希望同时在这两者中导航。

    [routerLink]="['./mainpage']

    我想要所有的商店都有,我怎么做?

    1 回复  |  直到 7 年前
        1
  •  -1
  •   Nickbing Lao    7 年前

    尝试使用动态组件而不是outlet

    推荐文章