fix(router): routerLinkActive should only set classes after the router has successfully navigated
This commit is contained in:
@ -94,7 +94,7 @@ export class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit
|
||||
ngOnDestroy(): any { this.subscription.unsubscribe(); }
|
||||
|
||||
private update(): void {
|
||||
if (!this.links || !this.linksWithHrefs) return;
|
||||
if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;
|
||||
|
||||
const currentUrlTree = this.router.parseUrl(this.router.url);
|
||||
const isActiveLinks = this.reduceList(currentUrlTree, this.links);
|
||||
|
Reference in New Issue
Block a user