Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
No
Description
In some cases, when a template contains expressions with invalid syntax, for example:
<input (input)="newBookmarkTags.set(($event.target as HTMLInputElement).value)">
Template parser identifies a problem, but can't recover from it, producing a build error with a lot of unrelated information.
Adding the "ai" label, since the code was originally generated by an LLM and having a clear and focused error message would increase a likelihood of a successful "repair" request to an LLM (asking to fix a given build error).
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-n1vvscar
Please provide the environment you discovered this bug in (run ng version)
Angular v20, but likely reproducible in earlier versions as well.
Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
No
Description
In some cases, when a template contains expressions with invalid syntax, for example:
Template parser identifies a problem, but can't recover from it, producing a build error with a lot of unrelated information.
Adding the "ai" label, since the code was originally generated by an LLM and having a clear and focused error message would increase a likelihood of a successful "repair" request to an LLM (asking to fix a given build error).
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-n1vvscar
Please provide the environment you discovered this bug in (run
ng version)