Skip to content

feat(router): Add more find-tuned control in routerLinkActiveOptions#40303

Closed
atscott wants to merge 1 commit intoangular:masterfrom
atscott:matchoptions
Closed

feat(router): Add more find-tuned control in routerLinkActiveOptions#40303
atscott wants to merge 1 commit intoangular:masterfrom
atscott:matchoptions

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Jan 4, 2021

This commit adds more configurability to the Router#isActive method
and RouterLinkActive#routerLinkActiveOptions.
It allows tuning individual match options for query params and the url
tree, which were either both partial or both exact matches in the past.
Additionally, it also allows matching against the fragment and matrix
parameters.

fixes #13205

BREAKING CHANGE:
The type of the RouterLinkActive.routerLinkActiveOptions input was
expanded to allow more fine-tuned control. Code that previously read
this property may need to be updated to account for the new type.

Additional note on the breaking change:
I found no places where routerLinkActiveOptions was read in g3. So while the type change is technically breaking, it's possible that nobody will be affected.

@atscott atscott added state: WIP target: minor This PR is targeted for the next minor release labels Jan 4, 2021
@google-cla google-cla bot added the cla: yes label Jan 4, 2021
@mary-poppins
Copy link

You can preview 469c542 at https://pr40303-469c542.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 0a9178b at https://pr40303-0a9178b.ngbuilds.io/.

@atscott atscott force-pushed the matchoptions branch 2 times, most recently from cb3dee0 to fe1ce31 Compare January 5, 2021 19:24
@atscott atscott changed the title feat(router): Add options for containsTree feat(router): Add more find-tuned control in routerLinkActiveOptions Jan 5, 2021
@mary-poppins
Copy link

You can preview fe1ce31 at https://pr40303-fe1ce31.ngbuilds.io/.

@atscott atscott added target: major This PR is targeted for the next major release area: router breaking changes and removed target: minor This PR is targeted for the next minor release state: WIP labels Jan 5, 2021
@ngbot ngbot bot added this to the Backlog milestone Jan 5, 2021
@atscott atscott marked this pull request as ready for review January 5, 2021 20:30
@pullapprove pullapprove bot added area: core Issues related to the framework runtime comp: docs/api labels Jan 5, 2021
@mary-poppins
Copy link

You can preview 44e5b5f at https://pr40303-44e5b5f.ngbuilds.io/.

@petebacondarwin
Copy link
Contributor

Looks like this causes a few size regressions that need updating.

Copy link
Contributor

@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.

LGTM - a few nits you can consider.

This was referenced Mar 15, 2021
@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 Mar 27, 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: core Issues related to the framework runtime area: router breaking changes cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

router.isActive and routerLinkActive to support more options

7 participants