angular/packages/compiler-cli
leonsenft d596d8bd0a refactor(compiler): support matching and validating foreign components in templates (#68674)
We extract the identifier name from the `foreignImports` expression in
`ComponentDecoratorHandler` and use a `SelectorlessMatcher` to match element
tags against these names. If an element matches both a regular Angular
directive and a foreign component, a conflict error is thrown.

In addition, we implement strict template semantic validation for these matched
foreign components within `TemplateSemanticsChecker`. Elements matched as
foreign components only support static attributes and property bindings. Any
event bindings, template references, or non-property input bindings (e.g.
class, style, or attribute bindings) trigger a semantic error diagnostic.

Finally, we skip standard DOM schema checks for foreign components to prevent spurious
validation errors since foreign components are not defined in standard HTML schemas.

PR Close #68674
2026-05-19 13:42:10 -07:00
..
linker feat(compiler): Angular expressions with optional chaining returns undefined 2026-04-28 15:26:53 -07:00
private refactor(compiler): move TCB generation logic into compiler 2026-04-15 19:43:29 +03:00
src refactor(compiler): support matching and validating foreign components in templates (#68674) 2026-05-19 13:42:10 -07:00
test refactor(compiler): support matching and validating foreign components in templates (#68674) 2026-05-19 13:42:10 -07:00
BUILD.bazel build: cleanup workspace deps 2026-04-23 11:38:26 -07:00
esbuild.config.js build: use esbuild from aspect rules (#62568) 2025-07-10 13:45:15 -07:00
index.ts feat(compiler-cli): support external TCBs with copied content in specific mode 2026-04-29 16:08:33 -07:00
package.json feat(compiler-cli): add support for Node.js 26.0.0 2026-05-06 09:55:38 -07:00
tsconfig-test.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
tsconfig.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00