New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Literal Array trailing comma in expressions causes error #20773
Comments
It's not just Note that it works in AngularJS. |
It's even not just arrays, but also objects. The following returns a syntax error when parsing the template during
This is compiled without errors, tho:
Both are valid Typescript. Since Typescript 2.9 traling commas are not allowed, but only on rest parameters (see breaking changes description and related fix). Both should compile without errors, so I guess this is a bug with the way Angular compiles the templates, right? |
@mhevery, I believe this is wrongly tagged as "feature" instead of "bug/fix" for the reasons exposed above. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
Current behavior
The following works:
the following gives error:
the difference is the trailing comma in the array of the
*ngIf
condition.Expected behavior
It should work still it's still valid javascript
Environment
The text was updated successfully, but these errors were encountered: