mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
In Ivy it's illegal for a template to write to a template variable. So the template: ```html <ng-template let-somevar> <button (click)="somevar = 3">Set var to 3</button> </ng-template> ``` is erroneous and previously would fail to compile with an assertion error from the `TemplateDefinitionBuilder`. This error wasn't particularly user- friendly, though, as it lacked the context of which template or where the error occurred. In this commit, a new check in template type-checking is added which detects such erroneous writes and produces a true diagnostic with the appropriate context information. Closes #33674 PR Close #34339 |
||
|---|---|---|
| .. | ||
| fake_core | ||
| BUILD.bazel | ||
| component_indexing_spec.ts | ||
| env.ts | ||
| incremental_error_spec.ts | ||
| incremental_spec.ts | ||
| modulewithproviders_spec.ts | ||
| monorepo_spec.ts | ||
| ngtsc_spec.ts | ||
| scope_spec.ts | ||
| sourcemap_utils.ts | ||
| template_mapping_spec.ts | ||
| template_typecheck_spec.ts | ||