angular/packages
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
..
animations test: remove duplicate tests (#67518) 2026-03-11 13:37:33 -07:00
benchpress build: update cross-repo angular dependencies 2026-03-05 11:43:25 -08:00
common fix(common): prevent focus from scrollToAnchor 2026-04-28 12:39:26 -07:00
compiler refactor(compiler): introduce default constant for legacyOptionalChaining flag 2026-04-29 10:01:13 -07:00
compiler-cli feat(compiler-cli): support external TCBs with copied content in specific mode 2026-04-29 16:08:33 -07:00
core fix(core): respect ngSkipHydration on components with projectable nodes in LContainers 2026-04-29 16:09:14 -07:00
docs/di build: format md files 2025-11-06 10:03:05 -08:00
elements refactor(core): remove ComponentFactoryResolver usages 2026-04-13 16:00:03 +03:00
examples feat(core): bootstrap via ApplicationRef with config 2026-04-07 12:48:53 -07:00
forms refactor(forms): replace any with unknown in interop control value types 2026-04-29 13:35:48 -07:00
language-service feat(compiler-cli): support external TCBs with copied content in specific mode 2026-04-29 16:08:33 -07:00
localize fix(localize): validate locale in getOutputPathFn to prevent path traversal 2026-03-30 12:15:26 +02:00
misc/angular-in-memory-web-api ci: remove remainings of saucelabs tests 2026-04-22 14:41:03 -07:00
platform-browser refactor(core): Don't throw when there are not async metadata 2026-04-27 17:04:09 -07:00
platform-browser-dynamic refactor(core): Don't throw when there are not async metadata 2026-04-27 17:04:09 -07:00
platform-server fix(core): respect ngSkipHydration on components with projectable nodes in LContainers 2026-04-29 16:09:14 -07:00
private/testing build: consolidate domino bundling in platform-server 2026-03-25 13:31:05 -07:00
router docs(router): Fix method name for retrieving stored handles 2026-04-27 17:03:21 -07:00
service-worker fix(service-worker): resolve TS 6.0 compatibility for messageerror listener 2026-04-09 21:46:28 +03:00
ssr/docs build: add node type for api extraction 2026-02-11 13:57:58 -08:00
upgrade refactor(core): remove ComponentFactoryResolver usages 2026-04-13 16:00:03 +03:00
zone.js ci: remove remainings of saucelabs tests 2026-04-22 14:41:03 -07:00
BUILD.bazel refactor(platform-browser): remove Hammer integration 2026-03-19 16:13:20 -07:00
circular-deps-test.conf.cjs build: use Node.js built-in TypeScript support for dev-infra scripts 2026-01-02 08:15:40 +01:00
empty.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
goog.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
license-banner.txt docs: update copyright year 2026-01-07 12:28:34 -05:00
package.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
README.md build: format md files 2025-11-06 10:03:05 -08:00
system.d.ts refactor: update packages/core:{core,src} to ts_project (#61275) 2025-05-14 12:01:51 +00:00
tsconfig-build.json Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)" 2025-11-06 13:09:01 -08:00
tsconfig-legacy-saucelabs.json ci: remove remainings of saucelabs tests 2026-04-22 14:41:03 -07:00
tsconfig-test.json
tsconfig.json feat(compiler-cli): enable type checking of host bindings by default (#63654) 2025-09-09 14:34:29 -07:00
tsec-exemption.json
types.d.ts refactor(platform-browser): remove Hammer integration 2026-03-19 16:13:20 -07:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT