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 |
||
|---|---|---|
| .. | ||
| compliance | ||
| diagnostics | ||
| helpers | ||
| metadata | ||
| ngtsc | ||
| transformers | ||
| BUILD.bazel | ||
| extract_i18n_spec.ts | ||
| mocks.ts | ||
| ngc_spec.ts | ||
| perform_compile_spec.ts | ||
| perform_watch_spec.ts | ||
| test_support.ts | ||
| typescript_support_spec.ts | ||