Angular 2 root's route is always active

后端 未结 3 1876
星月不相逢
星月不相逢 2021-02-20 07:45

Recently I read this useful article about Angular 2 Router and looked at the demo. Everything seemed to be perfect. But when I tried to determine the active route based on

3条回答
  •  囚心锁ツ
    2021-02-20 08:23

    Adding the following property to your home anchor worked for me. [routerLinkActiveOptions]="{ exact: true }"

    find out more https://github.com/angular/angular/issues/8397#issuecomment-237314970

提交回复
热议问题