angular/packages/platform-server/test
Sonu Kapoor 4c9afb68a3 fix(core): respect ngSkipHydration on components with projectable nodes in LContainers
When a component is created dynamically via ViewContainerRef.createComponent
and receives projectable nodes (e.g. raw DOM nodes or embedded view root nodes),
applying ngSkipHydration to its host element did not prevent NG0503 from being
thrown during SSR serialization.

The root cause is an asymmetry in the serialization pipeline. For inline child
components, serializeLView already guards the annotateHostElementForHydration
call with a ngSkipHydration attribute check, so the component's lView is never
serialized when hydration is opted out. For components hosted inside an
LContainer (created via ViewContainerRef.createComponent), serializeLContainer
called serializeLView unconditionally — bypassing that guard entirely. When
serializeLView then encountered a projection slot backed by a raw DOM node
array, it threw NG0503 regardless of the ngSkipHydration flag.

The fix adds the same guard inside serializeLContainer before calling
serializeLView: if the child lView belongs to a component whose host element
carries ngSkipHydration, the lView serialization is skipped. This matches the
existing behavior for inline components and allows the documented workaround to
actually work for dynamically created ones.

Fixes #67928
2026-04-29 16:09:14 -07:00
..
BUILD.bazel build: consolidate domino bundling in platform-server 2026-03-25 13:31:05 -07:00
dom_utils.ts fix(core): Ensure application remains unstable during bootstrap (#62631) 2025-07-15 07:52:36 -07:00
event_replay_spec.ts fix(core): prevent event replay double-invocation when element hydrates before app stability 2026-04-27 17:07:36 -07:00
full_app_hydration_spec.ts fix(core): respect ngSkipHydration on components with projectable nodes in LContainers 2026-04-29 16:09:14 -07:00
hydration_utils.ts feat(core): introduce BootstrapContext for improved server bootstrapping (#63562) 2025-09-09 10:57:09 -07:00
incremental_hydration_spec.ts feat(platform-browser): make incremental hydration default behavior 2026-04-09 18:53:13 +03:00
integration_spec.ts refactor(platform-server): split zone/zoneless tests. 2026-02-13 09:41:10 -08:00
platform_location_spec.ts fix(platform-server): ensure origin has a trailing slash when parsing url 2026-04-27 17:08:36 -07:00
render_spec.ts refactor: clean up explicit standalone flags from tests (#63963) 2025-09-22 14:27:34 +00:00
transfer_state_spec.ts fix(core): escape forward slashes in transfer state to prevent crawler indexing 2026-04-13 13:54:55 +03:00