Skip to content

fix(core): complete post-hydration cleanup in components that use ViewContainerRef - #57300

Closed
AndrewKushnir wants to merge 1 commit into
angular:mainfrom
AndrewKushnir:vcr_hydration_fix
Closed

AndrewKushnir wants to merge 1 commit into
angular:mainfrom
AndrewKushnir:vcr_hydration_fix

Conversation

@AndrewKushnir

Copy link
Copy Markdown
Contributor

Previously, if a component injects a ViewContainerRef, the post-hydration cleanup process doesn't visit inner views to cleanup dehydrated views in nested LContainers. This commit updates the logic to recognize this situation and enter host LView to complete cleanup.

Resolves #56989.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

…wContainerRef

Previously, if a component injects a `ViewContainerRef`, the post-hydration cleanup process doesn't visit inner views to cleanup dehydrated views in nested LContainers. This commit updates the logic to recognize this situation and enter host LView to complete cleanup.

Resolves angular#56989.
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release core: hydration labels Aug 8, 2024
@ngbot ngbot Bot modified the milestone: Backlog Aug 8, 2024

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

Nice, simple fix! LGTM

@thePunderWoman thePunderWoman 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 Aug 8, 2024
@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

Presubmit.

@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

This PR was merged into the repository by commit 26ddbdb.

The changes were merged into the following branches: main, 18.1.x, 18.2.x

AndrewKushnir added a commit that referenced this pull request Aug 9, 2024
…wContainerRef (#57300)

Previously, if a component injects a `ViewContainerRef`, the post-hydration cleanup process doesn't visit inner views to cleanup dehydrated views in nested LContainers. This commit updates the logic to recognize this situation and enter host LView to complete cleanup.

Resolves #56989.

PR Close #57300
AndrewKushnir added a commit that referenced this pull request Aug 9, 2024
…wContainerRef (#57300)

Previously, if a component injects a `ViewContainerRef`, the post-hydration cleanup process doesn't visit inner views to cleanup dehydrated views in nested LContainers. This commit updates the logic to recognize this situation and enter host LView to complete cleanup.

Resolves #56989.

PR Close #57300
@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 Sep 9, 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: core Issues related to the framework runtime core: hydration target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken hydration after v17 -> v18 migration if i18n blocks are used

2 participants