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 |
||
|---|---|---|
| .. | ||
| util | ||
| view | ||
| BUILD.bazel | ||
| r3_ast_absolute_span_spec.ts | ||
| r3_ast_spans_spec.ts | ||
| r3_ast_visitor_spec.ts | ||
| r3_template_transform_spec.ts | ||
| README.md | ||
| style_parser_spec.ts | ||
Tests in this directory are excluded from running in the browser and only run in node.