0

this is my code:

<select class="form-control selectpicker" (change)="changeTower()" [(ngModel)]="_selectedTower._id">
    <option attr.value="{{tower._id}}" *ngFor="#tower of _towers;">Tower {{tower.name}}</option>
</select>
  1. In firefox changeTower() is not hitting at all.
  2. In Edge it works only for first time and then stop working at all.

.

value of _selectedTower._id is not getting changed after first change..

Cœur
  • 37,241
  • 25
  • 195
  • 267
Arun Tyagi
  • 2,206
  • 5
  • 24
  • 37

1 Answers1

2

That is a known issue in Firefox and Edge

The workaround is to use the (change) event (and the events value) instead of ngModelChange

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

AFAIK there are already fixes but not yet released.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567