mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 |
||
|---|---|---|
| .. | ||
| annotate.ts | ||
| api.ts | ||
| cleanup.ts | ||
| compression.ts | ||
| error_handling.ts | ||
| event_replay.ts | ||
| i18n.ts | ||
| interfaces.ts | ||
| node_lookup_utils.ts | ||
| skip_hydration.ts | ||
| tokens.ts | ||
| utils.ts | ||
| views.ts | ||