Skip to content

Trailing comma in objects in template #49534

@waterplea

Description

@waterplea

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

compiler

Is this a regression?

No

Description

This issue was fixed like 3 years ago, but the comment that it also applies to objects was missed out:
#20773

Angular compiler breaks on following syntax because of the trailing comma:

<my-comp
  [data]="{
    key: value,
  }"
></my-comp>

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Parser Error: Unexpected token }, expected identifier, keyword, or string

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

"@angular/compiler": "14.1.0",

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions