You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular 9,10 NSRouterLinkActive does not set CSS class #2224
After upgrading Angular from 8 to 10, nsRouterLinkActive directive stopped adding CSS class on element. Seems like the reason is in this this.renderer.setStyle(should be this.renderer.addClass) call here
@NathanWalker After your fix CSS class is being added, but it's added to the link, which is not active.
I guess you should swap removeClass and addClass in this if/else
Activity
NathanWalker commentedon Aug 18, 2020
Thanks @denlysenko we’ll get this updated and publish a patch this afternoon.
NathanWalker commentedon Aug 18, 2020
@denlysenko published in 10.0.1 - let us know if you have further issue; thanks again for report.
denlysenko commentedon Aug 19, 2020
@NathanWalker After your fix CSS class is being added, but it's added to the link, which is not active.
I guess you should swap
removeClassandaddClassin this if/elsenativescript-angular/nativescript-angular/router/ns-router-link-active.ts
Lines 108 to 112 in 23cf9dc
NathanWalker commentedon Aug 19, 2020
Ah @denlysenko thanks, do you wanna try to submit a PR?
denlysenko commentedon Aug 19, 2020
ok