Skip to content

Commit

Permalink
fix(module:menu): fix menu matchRouter not work (#5095)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yadong Xie authored Apr 21, 2020
1 parent b61a914 commit 2724b9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/menu/menu-item.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import {
AfterContentInit,
ChangeDetectorRef,
ContentChildren,
Directive,
Inject,
Expand Down Expand Up @@ -91,6 +92,7 @@ export class NzMenuItemDirective implements OnInit, OnChanges, OnDestroy, AfterC
if (this.nzSelected !== hasActiveLinks) {
this.nzSelected = hasActiveLinks;
this.setSelectedState(this.nzSelected);
this.cdr.markForCheck();
}
});
}
Expand All @@ -111,6 +113,7 @@ export class NzMenuItemDirective implements OnInit, OnChanges, OnDestroy, AfterC

constructor(
private nzMenuService: MenuService,
private cdr: ChangeDetectorRef,
@Optional() private nzSubmenuService: NzSubmenuService,
@Inject(NzIsMenuInsideDropDownToken) public isMenuInsideDropDown: boolean,
@Optional() private routerLink?: RouterLink,
Expand Down

0 comments on commit 2724b9b

Please sign in to comment.