angular/packages
Payam Valadkhan e8201a5962 refactor(compiler-cli): add a compiler option to enable checking for orphan component (#52061)
Orphan component is an anti-pattern in Angular where a component is rendered while the NgModule declaring it is not installed. It is not easy to capture this scenario, specially in compile time. But it is possible to capture a special case in runtime where the component is being rendered without its NgModule even loaded into the browser. This change adds a flag in cli compiler option to enable such checking, and throwing a runtime exception if it happens. Note that such check is only done in dev mode.

Currently the check requires some generated code that is behind ngJitMode flag (i.e., call to ɵɵsetNgModuleScope), and the new flag can be set only if JIT mode is enabled (i.e., supportJitMode=true) otherwise an error will be thrown.

The orphan component is a main blocker for rolling out local compilation in g3. This option is needed for identifying and isolating such cases.

PR Close #52061
2023-10-10 15:30:26 -07:00
..
animations fix(platform-browser): set animation properties when using async animations. (#52087) 2023-10-10 11:59:13 -07:00
bazel fix(common): add missing types field for @angular/common/locales of exports in package.json (#52080) 2023-10-10 14:33:44 -07:00
benchpress feat(benchpress): report gc and render time spent in script (#50771) 2023-10-05 10:52:26 -07:00
common fix(common): add missing types field for @angular/common/locales of exports in package.json (#52080) 2023-10-10 14:33:44 -07:00
compiler refactor(compiler): capture unknown blocks inside switch (#52136) 2023-10-10 11:34:10 -07:00
compiler-cli refactor(compiler-cli): add a compiler option to enable checking for orphan component (#52061) 2023-10-10 15:30:26 -07:00
core docs(core): fix missing text in oversized image warning message (#52147) 2023-10-10 14:01:23 -07:00
docs/di docs: remove outdated/unsupported webworker doc (#49856) 2023-04-17 14:01:41 +00:00
elements build: remove support for Node.js v16 (#51755) 2023-09-13 10:49:06 -07:00
examples build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
forms refactor(forms): Use the Writable type when overwriting readonly properties. (#49754) 2023-09-22 10:02:13 -07:00
language-service feat(language-service): Support autocompletion for blocks (#52121) 2023-10-10 10:29:23 -07:00
localize build: update babel dependencies (#51898) 2023-10-09 17:01:20 -07:00
misc/angular-in-memory-web-api docs: update invalid links to the new http guides (#49456) 2023-06-22 17:06:59 -07:00
platform-browser fix(platform-browser): set animation properties when using async animations. (#52087) 2023-10-10 11:59:13 -07:00
platform-browser-dynamic feat(core): Remove deprecated CompilerOptions.useJit andCompilerOptions.missingTranslation. (#49672) 2023-10-10 09:35:55 -07:00
platform-server refactor(platform-browser): remove withNoDomReuse function (#52057) 2023-10-09 13:36:16 -07:00
private/testing fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
router feat(router): Add callback to execute when a view transition is created (#52002) 2023-10-10 11:16:22 -07:00
service-worker refactor(service-worker): Remove deprecated activated & available observables. (#49498) 2023-10-10 11:54:07 -07:00
upgrade build: remove support for Node.js v16 (#51755) 2023-09-13 10:49:06 -07:00
zone.js build: lock file maintenance (#51834) 2023-10-04 11:31:27 -07:00
BUILD.bazel build(bazel): list docs entrypoints under packages to simplify docgen 2022-11-22 13:51:16 -07:00
circular-deps-test.conf.js build: ignore type only imports/exports for circular dependency checks (#47017) 2022-08-18 12:06:09 -07:00
empty.ts
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt build: bump license year (#44590) 2022-01-04 12:05:25 -08:00
README.md
system.d.ts
tsconfig-build.json build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
tsconfig-legacy-saucelabs.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsconfig-test.json build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tsconfig-tsec-base.json refactor(core): throw an error when hydration marker is missing from DOM (#51170) 2023-08-04 11:31:49 -04:00
tsconfig.json build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
tsec-exemption.json fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
types.d.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00: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