-
Notifications
You must be signed in to change notification settings - Fork 27k
feat(router): Allow UrlTree as an input to routerLink
#56265
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
Conversation
|
This is great, thanks so much @atscott |
thePunderWoman
left a comment
There was a problem hiding this 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
8f8e7bd to
0ea84d2
Compare
AndrewKushnir
left a comment
There was a problem hiding this 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
0ea84d2 to
b97e377
Compare
|
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 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