angular/packages/core
Doug Parker cdda51a3b2 feat(core): support bootstrapping Angular applications underneath shadow roots
This is a minimal implmentation which just focuses on registering parent shadow roots in `SharedStylesHost` correctly.

We don't currently reference count usage of host values, meaning that as soon as we call `removeHost`, all styles are removed from it, even if other components relied on them. Therefore there is no good way to know whether styles are still needed or not, leaving us with the choice of either leaking them longer than necessary or destroying them while another component still needs them. The compromise I'm using here is to delete styles when destroying a component under a shadow root (based on the assumption that only one component will exist per shadow root) and to leave styles when destroying a component in the main document (based on the assumption that dialogs being destroyed should not impact the main application).

Neither assumption is totally safe to make, but we're hoping this is a viable balance for the moment. In the future we should look into lifting these restrictions to better support those use cases while properly reference counting usage of hosts in `SharedStylesHost`.

I also added some small tests to confirm that SSR styles are not duplicated, as an earlier implementation accidentally duplicated them. This should ensure we don't repeat that mistake.
2026-04-10 21:44:08 +03:00
..
global build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
primitives fix(core): remove obsolete iOS cursor pointer hack in event delegation 2026-04-08 11:31:30 -07:00
resources fix(core): Remove note to skip arrow functions in best practices 2026-01-20 10:42:42 -08:00
rxjs-interop test(core): refactors test to use timeout utility 2026-04-01 20:46:00 +02:00
schematics fix(migrations): Fix typo for strict-template migration 2026-04-10 20:22:16 +03:00
src feat(core): support bootstrapping Angular applications underneath shadow roots 2026-04-10 21:44:08 +03:00
test feat(core): support bootstrapping Angular applications underneath shadow roots 2026-04-10 21:44:08 +03:00
testing refactor: prepare for required changeDetection prop on G3. 2026-03-20 15:52:38 -07: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: update minimum supported Node.js versions 2026-02-25 07:57:18 -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