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

Most upvoted comments

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:

<select [ngModel]="value" (change)="changeValue($event.target.value)">

Bug is actual for select.

We need this applied immediately, what’s holding you guys back?

I think there’s tons of other stuff to do. Maybe you can speedup the process by send a pull request that fixes this?