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
  • 34,719
  • 24
  • 185
  • 251
Arun Tyagi
  • 2,046
  • 5
  • 22
  • 35

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
  • 558,509
  • 191
  • 1,911
  • 1,506