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

feat(router): new output that would notify when link is activated #43280

Closed
wants to merge 1 commit into from

Conversation

anandtiwary
Copy link
Contributor

@anandtiwary anandtiwary commented Aug 28, 2021

This commit adds a new output to routerLinkActive directive.
Whenever, the associated link becomes active or inactive, an
event will be fired on this out with the correct status

PR Close #37284

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #37284

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Aug 28, 2021
@anandtiwary anandtiwary marked this pull request as ready for review August 28, 2021 07:42
@pullapprove pullapprove bot requested a review from atscott August 28, 2021 07:42
@atscott atscott added target: minor This PR is targeted for the next minor release area: router labels Aug 30, 2021
@ngbot ngbot bot added this to the Backlog milestone Aug 30, 2021
@@ -72,6 +72,16 @@ import {RouterLink, RouterLinkWithHref} from './router_link';
* </div>
* ```
*
* You can use the output `isActiveChange` to get notified each time the link becomes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this documentation to be on the actual isActiveChange output below. Also, you should mention what true or false indicates. I know it might seem implied already, but it's best to be explicit.

FYI, since I know there have been issues with the commit history in past PRs, you can use fixup commits that will be squashed when merged:

git commit --all --fixup HEAD
git push

https://github.com/angular/angular/blob/master/CONTRIBUTING.md#addressing-review-feedback

Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍪

reviewed-for: public-api

@pullapprove pullapprove bot requested a review from jelbourn August 31, 2021 16:15
@anandtiwary
Copy link
Contributor Author

Cool, so you still want me to make this documentation change right?

@atscott
Copy link
Contributor

atscott commented Aug 31, 2021

Cool, so you still want me to make this documentation change right?

That's right. Please still make the change.

@atscott
Copy link
Contributor

atscott commented Aug 31, 2021

internal tests

Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@anandtiwary
Copy link
Contributor Author

@atscott why did the test fail now? or is it an internal test?

This commit adds a new output to `routerLinkActive` directive.
Whenever, the associated link becomes active or inactive, an
event will be fired on this out with the correct status

PR Close angular#37284
@atscott
Copy link
Contributor

atscott commented Aug 31, 2021

@anandtiwary because we moved the documentation to the event, the public API removed the (undocumented) note from it. I fixed it and pushed to your branch

@anandtiwary
Copy link
Contributor Author

Thanks!

Copy link
Member

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: public-api

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Aug 31, 2021
@anandtiwary
Copy link
Contributor Author

@atscott Is there an automated process that runs periodically and merges the approved PRs? just trying to understand the process.

@atscott
Copy link
Contributor

atscott commented Aug 31, 2021

@anandtiwary There's no automated process. The caretaker periodically goes through the merge queue and merges things by hand. This will likely happen for this PR sometime tomorrow.

@jessicajaniuk
Copy link
Contributor

@anandtiwary This has been merged into master.

TeriGlover pushed a commit to TeriGlover/angular that referenced this pull request Sep 16, 2021
…gular#43280)

This commit adds a new output to `routerLinkActive` directive.
Whenever, the associated link becomes active or inactive, an
event will be fired on this out with the correct status

PR Close angular#37284

PR Close angular#43280
TeriGlover pushed a commit to TeriGlover/angular that referenced this pull request Sep 22, 2021
…gular#43280)

This commit adds a new output to `routerLinkActive` directive.
Whenever, the associated link becomes active or inactive, an
event will be fired on this out with the correct status

PR Close angular#37284

PR Close angular#43280
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: router cla: yes target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[routerLink][routerLinkActive] Add event when link becomes active
4 participants