feat(router): Allow UrlTree as an input to routerLink#56265
Closed
atscott wants to merge 1 commit intoangular:mainfrom
Closed
feat(router): Allow UrlTree as an input to routerLink#56265atscott wants to merge 1 commit intoangular:mainfrom
UrlTree as an input to routerLink#56265atscott wants to merge 1 commit intoangular:mainfrom
Conversation
|
This is great, thanks so much @atscott |
thePunderWoman
approved these changes
Jun 5, 2024
Contributor
thePunderWoman
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
8f8e7bd to
0ea84d2
Compare
AndrewKushnir
approved these changes
Jun 5, 2024
AndrewKushnir
approved these changes
Jun 5, 2024
Contributor
AndrewKushnir
left a comment
There was a problem hiding this comment.
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
0ea84d2 to
b97e377
Compare
Member
|
This PR was merged into the repository by commit a13f5da. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds
UrlTreeas a valid input torouterLink. It disallows using this together with any inputs that come fromUrlCreationOptions, such asqueryParamsorfragment.We could, in the future, decide on a different approach for these, like merging or replacing those in
urlTreeinput. 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