Skip to content
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

fix(router): remove child outlet context from parent on deactivation #41381

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Mar 30, 2021

When we deactivate a child route, we deactivate its outlet as well as
its children. We also need to remove this context from the parent Map.
If we do not, the parent will hold on to a reference to this deactivated
context and can result in reactivating an outlet that was deactivated by
the previous navigation.

Fixes #41379

@atscott atscott added action: review The PR is still awaiting reviews from at least one requested reviewer area: router target: patch This PR is targeted for the next patch release action: presubmit The PR is in need of a google3 presubmit labels Mar 30, 2021
@ngbot ngbot bot modified the milestone: Backlog Mar 30, 2021
@google-cla google-cla bot added the cla: yes label Mar 30, 2021
@atscott atscott removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 30, 2021
@atscott atscott marked this pull request as draft March 30, 2021 17:36
…ating route

When we deactivate a child route, we deactivate its outlet as well as
its children. We also need to clear the stored information about the
route and the associated component.
If we do not, the context will keep these references and can result in
reactivating an outlet that was deactivated by the previous navigation.

Fixes angular#41379
@atscott
Copy link
Contributor Author

atscott commented Apr 1, 2021

presubmit

@atscott atscott marked this pull request as ready for review April 1, 2021 22:19
@atscott atscott removed action: presubmit The PR is in need of a google3 presubmit state: WIP labels Apr 1, 2021
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.

LGTM 👍

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Apr 7, 2021
@zarend zarend closed this in d28a391 Apr 7, 2021
zarend pushed a commit that referenced this pull request Apr 7, 2021
…ating route (#41381)

When we deactivate a child route, we deactivate its outlet as well as
its children. We also need to clear the stored information about the
route and the associated component.
If we do not, the context will keep these references and can result in
reactivating an outlet that was deactivated by the previous navigation.

Fixes #41379

PR Close #41381
@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 May 8, 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: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auxilliary Routes are not properly deactivated
3 participants