Skip to content

Attribute two way binding not working with $any and error is unclearΒ #51165

@roma2341

Description

@roma2341

Which @angular/* package(s) are the source of the bug?

compiler, core

Is this a regression?

No

Description

Example:
<input [(ngModel)]="$any(name)">
I understand that it's impossible, but error message is completely unclear.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-n2yh4n?file=src%2Fmain.ts

Please provide the exception or error you saw

`Parser Error: Unexpected token '=' at column 12 in [$any(name) =$event] in /~/src/main.ts@11:24`

Please provide the environment you discovered this bug in (run ng version)

angular 16.1.6
Node v18.12.1

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions