mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
There is a bug in the existing handling for cross-file references. Suppose there are two files, module.ts and component.ts. component.ts declares two components, one of which uses the other. In the Ivy model, this means the component will get a directives: reference to the other in its defineComponent call. That reference is generated by looking at the declared components of the module (in module.ts). However, the way ngtsc tracks this reference, it ends up comparing the identifier of the component in module.ts with the component.ts file, detecting they're not in the same file, and generating a relative import. This commit changes ngtsc to track all identifiers of a reference, including the one by which it is declared. This allows toExpression() to correctly decide that a local reference is okay in component.ts. PR Close #25080 |
||
|---|---|---|
| .. | ||
| fake_core | ||
| BUILD.bazel | ||
| ngtsc_spec.ts | ||