angular/packages/core
Max Millien 1890c3008b fix(core): clean up dehydrated views during HMR component replacement
During HMR, `recreateLView()` destroys the old LView and removes its
DOM nodes, but never cleans up dehydrated view DOM nodes stored in
`LContainer[DEHYDRATED_VIEWS]`. These are SSR-rendered DOM nodes
preserved by Angular's hydration system. When the new view renders,
both the old dehydrated DOM and the new DOM coexist, causing visible
duplication (e.g. `<app-shell>` header/footer appearing twice).

Call `cleanupLView` from the hydration cleanup module after
`destroyLView` and before `removeViewFromDOM` to remove any remaining
dehydrated DOM nodes before the replacement view is rendered.

Fixes #66503

(cherry picked from commit dc0446552a)
2026-03-16 09:04:11 -07:00
..
global build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
primitives refactor: ensure modules with 'declare global' are correctly handled by Rollup 2026-03-12 13:58:03 -07:00
resources fix(core): Remove note to skip arrow functions in best practices 2026-01-20 10:42:42 -08:00
rxjs-interop refactor(core): remove old resource params 2026-03-11 17:44:16 +00:00
schematics feat(compiler): Exhaustive checks for switch blocks 2026-02-17 10:25:31 -08:00
src fix(core): clean up dehydrated views during HMR component replacement 2026-03-16 09:04:11 -07:00
test fix(core): clean up dehydrated views during HMR component replacement 2026-03-16 09:04:11 -07:00
testing docs: rewrite testing docs 2026-01-05 19:38:23 -05:00
BUILD.bazel refactor(core): export profile event as enum and move profile_types.ts and framework to shared devtools folder 2025-11-19 15:22:49 -08:00
index.ts refactor: update packages/core:{core,src} to ts_project (#61275) 2025-05-14 12:01:51 +00:00
package.json build: bump core zone.js version 2025-11-19 13:22:14 -08:00
PACKAGE.md build: format md files 2025-11-06 10:03:05 -08:00
public_api.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
tsconfig-build.json build: migrate more targets of @angular/core to ts_project (#61370) 2025-05-16 11:02:07 +00:00
tsconfig-test.json build: migrate more targets of @angular/core to ts_project (#61370) 2025-05-16 11:02:07 +00:00