mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The `read` option for queries can rely on lexical variables inside the class. These constructs are fine from a technical perspective in TypeScript, but in practice, when the component/directive definition is being created, the read value is extracted into the definition, **outside** of the class. This breaks `this` references. To fix this, we are restricting the `read` option to literal values. Similar to `descendants`. Literal references are in practice constructs like: - `read: bla.X` - `read: X` where `bla` or `X` is never a `ThisKeywoord`- hence fixing the issue and also simplifying the patterns for easier single file compilation. PR Close #54257 |
||
|---|---|---|
| .. | ||
| integrationtest | ||
| linker | ||
| ngcc | ||
| private | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| esbuild.config.js | ||
| index.ts | ||
| package.json | ||
| tsconfig-build.json | ||
| tsconfig.json | ||