-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilercompiler: parsercore: binding & interpolationIssue related to property/attribute binding or text interpolationIssue related to property/attribute binding or text interpolationfreq1: lowstate: confirmedstate: has PRtype: bug/fixworkaround1: obvious
Milestone
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
The following works:
<div
*ngIf="[
'first value',
'last value'
].indexOf(myVar) > -1"
></div>
the following gives error:
<div
*ngIf="[
'first value',
'last value',
].indexOf(myVar) > -1"
></div>
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
Browser:
Chrome (desktop) Version: 62.0.3202.94 (Official Build) (64-bit)
Environment:
Angular CLI: 1.5.5
Node: 8.9.1
OS: linux x64
Angular: 5.0.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.5
@angular-devkit/build-optimizer: 0.0.34
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.38
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.5
@schematics/angular: 0.1.8
typescript: 2.4.2
webpack: 3.8.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilercompiler: parsercore: binding & interpolationIssue related to property/attribute binding or text interpolationIssue related to property/attribute binding or text interpolationfreq1: lowstate: confirmedstate: has PRtype: bug/fixworkaround1: obvious