angular: Alpha35: Empty event expression produce cryptic error
Related: #3664 (should be fixed together)
I have a template with the following element:
<input type="file" id="picture" accept="image/*"
(change)="onFileSelected(f, $event)"
(fileread)>
On alpha 33 it worked great. On alpha35 it produces the following runtime error:
EXCEPTION: TypeError: Cannot set property 'lastInBinding' of undefined
angular2.js:13030 STACKTRACE:
angular2.js:13030 TypeError: Cannot set property 'lastInBinding' of undefined
at Function.execute._ConvertAstIntoProtoRecords.create (http://localhost:5555/lib/angular2.js:18104:47)
at http://localhost:5555/lib/angular2.js:17730:49
at Array.map (native)
at createEventRecords (http://localhost:5555/lib/angular2.js:17729:36)
at JitProtoChangeDetector.execute.JitProtoChangeDetector._createFactory (http://localhost:5555/lib/angular2.js:17575:39)
at new JitProtoChangeDetector (http://localhost:5555/lib/angular2.js:17567:32)
at $__1.execute.JitChangeDetection.createProtoChangeDetector (http://localhost:5555/lib/angular2.js:10323:20)
at http://localhost:5555/lib/angular2.js:15553:42
at Array.map (native)
at Function.execute.ListWrapper.map (http://localhost:5555/lib/angular2.js:6374:26)
The following modification still produces the error:
<input type="file" id="picture" accept="image/*"
(change)="onFileSelected(f, $event)"
(fileread)="">
This one works
<input type="file" id="picture" accept="image/*"
(change)="onFileSelected(f, $event)"
(fileread)="x">
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- fix(TemplateParser): report empty expression fixes #3754 — committed to vicb/angular by vicb 8 years ago
- fix(TemplateParser): report empty expression fixes #3754 — committed to vicb/angular by vicb 8 years ago
- fix(TemplateParser): report empty expression fixes #3754 — committed to vicb/angular by vicb 8 years ago
- fix(TemplateParser): report empty expression (#10391) fixes #3754 — committed to angular/angular by vicb 8 years ago
This error is still occuring in RC1 when using something like
<a (click)></a>)
.(Forgot to add handler to an anchor element and Chrome spit this out)