Skip to content

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Jun 5, 2024

This commit adds UrlTree as a valid input to routerLink. It disallows using this together with any inputs that come from UrlCreationOptions, such as queryParams or fragment.

We could, in the future, decide on a different approach for these, like merging or replacing those in urlTree input. We cannot, however, go the other way (decide to prevent those inputs if we've already decided to allow it and using a merging/replacing strategy). For this reason, an error seems the most reasonable approach to start and we can re-evaluate if there's a compelling reason to.

fixes #34468

@atscott atscott added the target: minor This PR is targeted for the next minor release label Jun 5, 2024
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jun 5, 2024
@ngbot ngbot bot added this to the Backlog milestone Jun 5, 2024
@samuelfernandez
Copy link

This is great, thanks so much @atscott

Copy link
Contributor

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

@pullapprove pullapprove bot requested a review from dylhunn June 5, 2024 13:58
@atscott atscott force-pushed the urltreerouterlink branch from 8f8e7bd to 0ea84d2 Compare June 5, 2024 16:16
@pullapprove pullapprove bot requested a review from AndrewKushnir June 5, 2024 23:17
Copy link
Contributor

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

This commit adds `UrlTree` as a valid input to `routerLink`. It
disallows using this together with any inputs that come from
`UrlCreationOptions`, such as `queryParams` or `fragment`.

We could, in the future, decide on a different approach for these, like merging or
replacing those in `urlTree` input. We cannot, however, go the other way
(decide to prevent those inputs if we've already decided to allow it and
using a merging/replacing strategy). For this reason, an error seems the
most reasonable approach to start and we can re-evaluate if there's a
compelling reason to.

fixes angular#34468
@atscott atscott force-pushed the urltreerouterlink branch from 0ea84d2 to b97e377 Compare June 5, 2024 23:23
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jun 6, 2024
@alxhub
Copy link
Member

alxhub commented Jun 7, 2024

This PR was merged into the repository by commit a13f5da.

@alxhub alxhub closed this in a13f5da Jun 7, 2024
@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 Jul 8, 2024
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 detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(router-link): Accept UrlTree as input

5 participants