angular/packages/compiler/src
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
..
expression_parser fix(compiler): throw on invalid in expressions 2026-02-23 13:35:07 -08:00
i18n ci: reformat files 2025-12-16 14:44:19 -08:00
ml_parser fix(compiler): let declaration span not including end character 2026-04-27 17:09:14 -07:00
output feat(compiler): Angular expressions with optional chaining returns undefined 2026-04-28 15:26:53 -07:00
render3 refactor(compiler): support matching and validating foreign components in templates (#68674) 2026-05-19 13:42:10 -07:00
schema fix(compiler): strip namespaced SVG script elements during template compilation 2026-05-19 13:06:00 -07:00
template/pipeline fix(core): support prefix-insensitive DOM schema lookups and compile-time i18n attribute validation 2026-05-19 13:00:32 -07:00
template_parser fix(compiler): strip namespaced SVG script elements during template compilation 2026-05-19 13:06:00 -07:00
typecheck refactor(compiler): support matching and validating foreign components in templates (#68674) 2026-05-19 13:42:10 -07:00
chars.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
combined_visitor.ts feat(compiler): Exhaustive checks for switch blocks 2026-02-17 10:25:31 -08:00
compiler.ts fix(core): support prefix-insensitive DOM schema lookups and compile-time i18n attribute validation 2026-05-19 13:00:32 -07:00
compiler_facade_interface.ts refactor(compiler): introduce default constant for legacyOptionalChaining flag 2026-04-29 10:01:13 -07:00
config.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
constant_pool.ts feat(core): support spread elements in array literals 2026-01-07 12:37:52 -05:00
core.ts fix(core): support prefix-insensitive DOM schema lookups and compile-time i18n attribute validation 2026-05-19 13:00:32 -07:00
directive_matching.ts refactor(compiler): add more information to template binder (#60977) 2025-04-24 13:02:39 -07:00
injectable_compiler_2.ts feat(core): introduce @Service decorator 2026-04-22 11:01:01 -07:00
jit_compiler_facade.ts fix(core): disallow event attribute bindings in host bindings unconditionally 2026-05-07 16:19:22 -06:00
legacy_optional_chaining_default.ts refactor(compiler): introduce default constant for legacyOptionalChaining flag 2026-04-29 10:01:13 -07:00
parse_util.ts refactor(compiler): ensure compiler passes closure conformance checks (#62500) 2025-07-07 16:14:16 +00:00
property_mapping.ts refactor(compiler-cli): move ClassPropertyMapping into compiler 2026-04-03 09:44:39 -07:00
resource_loader.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
service_compiler.ts feat(core): introduce @Service decorator 2026-04-22 11:01:01 -07:00
shadow_css.ts fix(compiler): simplify handling of colon host with a selector list 2026-05-12 14:25:46 -07:00
style_url_resolver.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
util.ts refactor(compiler): remove unused code (#61668) 2025-05-26 12:21:09 +00:00
version.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00