Skip to content

fix(core): HMR not matching component that injects ViewContainerRef#59596

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:59592/vcr-hmr
Closed

fix(core): HMR not matching component that injects ViewContainerRef#59596
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:59592/vcr-hmr

Conversation

@crisbeto
Copy link
Copy Markdown
Member

If a component injects ViewContainerRef, its LView gets wrapped in an empty LContainer and the container's host becomes the LView. The HMR logic wasn't accounting for this which meant that such components wouldn't be replaced.

Fixes #59592.

If a component injects `ViewContainerRef`, its `LView` gets wrapped in an empty `LContainer` and the container's host becomes the `LView`. The HMR logic wasn't accounting for this which meant that such components wouldn't be replaced.

Fixes angular#59592.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jan 17, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Jan 17, 2025
@ngbot ngbot bot added this to the Backlog milestone Jan 17, 2025
@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 17, 2025
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jan 18, 2025
@pkozlowski-opensource
Copy link
Copy Markdown
Member

This PR was merged into the repository by commit 2caa45a.

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

pkozlowski-opensource pushed a commit that referenced this pull request Jan 20, 2025
…59596)

If a component injects `ViewContainerRef`, its `LView` gets wrapped in an empty `LContainer` and the container's host becomes the `LView`. The HMR logic wasn't accounting for this which meant that such components wouldn't be replaced.

Fixes #59592.

PR Close #59596
PrajaktaB27 pushed a commit to PrajaktaB27/angular that referenced this pull request Feb 7, 2025
…ngular#59596)

If a component injects `ViewContainerRef`, its `LView` gets wrapped in an empty `LContainer` and the container's host becomes the `LView`. The HMR logic wasn't accounting for this which meant that such components wouldn't be replaced.

Fixes angular#59592.

PR Close angular#59596
@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 Feb 20, 2025
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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ViewContainerRef breaks HMR

3 participants