angular/integration/standalone-bootstrap
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
..
src build: enable angular formatting on all html files 2025-12-08 10:19:45 -08:00
.editorconfig test(core): add integration test apps for the bootstrapApplication API (#45674) 2022-04-21 17:47:54 -07:00
.gitignore test(core): add integration test apps for the bootstrapApplication API (#45674) 2022-04-21 17:47:54 -07:00
angular.json test: remove unused Protractor E2E targets from integration tests 2026-02-10 09:41:26 -08:00
BUILD.bazel ci: use new size tracking in integration tests (#62650) 2025-07-17 13:56:22 -04:00
karma.conf.js refactor: apply prettier formatting to integration (#54653) 2024-04-02 20:42:04 +00:00
package.json build: update cross-repo angular dependencies 2026-04-09 14:13:51 +03:00
pnpm-lock.yaml build: update cross-repo angular dependencies 2026-04-09 14:13:51 +03:00
pnpm-workspace.yaml ci: add zone.js to minimumReleaseAgeExclude 2026-02-19 12:41:19 -08:00
README.md build: clean up references to old master branch (#45856) 2022-05-04 16:23:33 -07:00
size.json feat(core): support bootstrapping Angular applications underneath shadow roots 2026-04-10 21:44:08 +03:00
tsconfig.app.json refactor: cleanup polyfills by importing zone.js directly in angular.json (#48380) 2022-12-13 13:37:08 -08:00
tsconfig.json refactor(compiler): remove fullTemplateTypeCheck compiler option. 2026-04-06 11:55:09 -07:00
tsconfig.spec.json refactor(core): remove test.ts files in integration tests (#52109) 2023-10-18 11:52:55 -07:00

Standalone Bootstrap test app

This project was generated with Angular CLI.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.