Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[routerLink][routerLinkActive] Add event when link becomes active #37284
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relevant Package
This feature request is for @angular/routerDescription
I've searched a bit but didn't find such a request or discussion which feels rather strange. Right now routerLinkActive works around change detection by applying classes directly. Therefore we cannot react to this event with something like a sliding underline in the tabs of links. It would be great if routerLinkActive directive had an output that triggers when link becomes active. It's easy to make a wrapper directive or something, but it would be nice to have it out of the box.
Describe the solution you'd like
Just an EventEmitter output
routerLinkActivatedonrouterLinkActivedirective.Describe alternatives you've considered
Create a custom directive with the same logic.