Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[routerLink][routerLinkActive] Add event when link becomes active #37284

Open
waterplea opened this issue May 25, 2020 · 0 comments
Open

[routerLink][routerLinkActive] Add event when link becomes active #37284

waterplea opened this issue May 25, 2020 · 0 comments

Comments

@waterplea
Copy link

@waterplea waterplea commented May 25, 2020

🚀 feature request

Relevant Package

This feature request is for @angular/router

Description

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 routerLinkActivated on routerLinkActive directive.

Describe alternatives you've considered

Create a custom directive with the same logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.