Skip to content

Trailing comma in objects in template #49534

Closed

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

Activity

  1. self-assigned this
    on Mar 22, 2023
  2. added a commit that references this issue on Mar 22, 2023
    5a142a3
  3. added
    area: compiler
    on Mar 22, 2023
  4. added this to the needsTriage milestone on Mar 22, 2023
  5. added a commit that references this issue on Mar 23, 2023
    c3cff35
  6. angular-automatic-lock-bot commented on Apr 23, 2023

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  7. locked and limited conversation to collaborators on Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: compilerstate: has PR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions