mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 |
||
|---|---|---|
| .. | ||
| binding_spec.ts | ||
| i18n_spec.ts | ||
| parse_template_options_spec.ts | ||
| util.ts | ||