angular: beta.1 ngModel/ngModelChange not working on select element in FireFox 43.0.4
I’m seeing an issue in beta.1
that appears to be a regression from beta.0
. ngModel/ngModelChange
don’t appear to work at all in Firefox, at least on selects. Here’s a plunkr demo. You’ll notice if you change the script src’s to beta.0, the selects work as expected. Is there a breaking change that I’m missing? I don’t see anything about ngModel/ngModelChange
in the changelog.
import {Component} from 'angular2/core';
@Component({
selector: 'my-app',
template: `
<h1>ngModel/ngModelChange not working on Firefox</h1>
<select [ngModel]="name" (ngModelChange)="changed($event)">
<option value=""></option>
<option *ngFor="#n of names" [value]="n">{{n}}</option>
</select>
<pre>Name: {{name}}</pre>
<select [(ngModel)]="name">
<option value=""></option>
<option *ngFor="#n of names" [value]="n">{{n}}</option>
</select>
<pre>Name: {{name}}</pre>
`
})
export class AppComponent {
names: String[] = ['Alpha', 'Bravo', 'Charlie'];
name: string;
changed(event) {
this.name = event;
}
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 9
- Comments: 42 (6 by maintainers)
Commits related to this issue
- fix(forms): ensure select model updates in firefox and ie Closes #6573 — committed to kara/angular by kara 8 years ago
- fix(forms): ensure select model updates in firefox and ie Closes #6573 — committed to angular/angular by kara 8 years ago
1+ got the same problem on IE11, solved with workaround:
(change)="somefunction($event.target.value)
Thank you very much! 👏🎉☀️
For 44.0 also doesn’t work.
Temporary I’ve fix it locally with:
Bug is actual for select.
I think there’s tons of other stuff to do. Maybe you can speedup the process by send a pull request that fixes this?