Angular 2 beta – Select not working (except in Chrome)

I think that this answer could provide you a work around and the Mark’s answer:

Here is some code:

@Component({
  (...)
  template: `
    <select [ngModel]="selectedDevice" (ngModelChange)="onChange($event)">
      <option *ngFor="#i of devices">{{i}}</option>
    </select>
  `)
  export class SomeComponent {

    onChange(newValue) {
      console.log(newValue);
      this.selectedDevice = newValue;
      // ... do other stuff here ...
    }
  }

Leave a Comment