Skip to content

feat(router): add relativeTo as an input to routerLink - #39720

Closed
atscott wants to merge 1 commit into
angular:masterfrom
atscott:relativeto
Closed

atscott wants to merge 1 commit into
angular:masterfrom
atscott:relativeto

Conversation

@atscott

@atscott atscott commented Nov 16, 2020

Copy link
Copy Markdown
Contributor

Allow configuration of relativeTo in the routerLink directive. This
is related to the clearing of auxiliary routes, where you need to use
relativeTo: route.parent in order to clear it from the activated
auxiliary component itself. This is because relativeTo: route will
consume the segment that we're trying to clear, so there is really no
way to do this with routerLink at the moment.

Related issue: #13523
Related (internal link): https://yaqs.corp.google.com/eng/q/5999443644645376

@atscott atscott added action: review The PR is still awaiting reviews from at least one requested reviewer area: router target: minor This PR is targeted for the next minor release labels Nov 16, 2020
@ngbot ngbot Bot modified the milestone: needsTriage Nov 16, 2020
@google-cla google-cla Bot added the cla: yes label Nov 16, 2020
Comment thread packages/router/src/directives/router_link.ts Outdated
Comment thread packages/router/src/directives/router_link.ts Outdated
Comment thread packages/router/test/integration.spec.ts Outdated
Comment thread packages/router/test/integration.spec.ts Outdated

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍 Just a couple comments to add some notes on undefined vs null values.

Reviewed-for: public-api

Comment thread packages/router/src/directives/router_link.ts Outdated
Comment thread packages/router/src/directives/router_link.ts Outdated
@pullapprove
pullapprove Bot requested a review from alxhub November 25, 2020 00:20
Allow configuration of `relativeTo` in the `routerLink` directive. This
is related to the clearing of auxiliary routes, where you need to use
`relativeTo: route.parent` in order to clear it from the activated
auxiliary component itself. This is because `relativeTo: route` will
consume the segment that we're trying to clear, so there is really no
way to do this with routerLink at the moment.

Related issue: angular#13523
Related (internal link): https://yaqs.corp.google.com/eng/q/5999443644645376

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should add docs for this in the same PR

Comment thread goldens/public-api/router/router.d.ts
@pullapprove
pullapprove Bot requested a review from jelbourn November 25, 2020 21:05

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

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 removed the area: router label Dec 9, 2020
@ngbot ngbot Bot removed this from the needsTriage milestone Dec 9, 2020
@ngbot ngbot Bot added this to the Backlog milestone Dec 10, 2020
@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 10, 2020
@alxhub alxhub closed this in 112324a Dec 10, 2020
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Jan 10, 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.

4 participants