Answers for "select list after change event angular"

1

select onchange pass option value in angular 6

<select (change)="onChange($event.target.value)">
    <option *ngFor="let i of devices">{{i}}</option>
</select>

onChange(deviceValue) {
    console.log(deviceValue);
}
Posted by: Guest on May-01-2020
1

onchange event angular select

-------------For Two Way Data Binding-----------------
<select [ngModel]="selectedDevice" (ngModelChange)="onChange($event)" name="deviceText">
    <option [value]="i" *ngFor="let i of devices">{{i}}</option>
</select>

onChange(event){
selectedDevice=event;
  -----
  -----
}
Posted by: Guest on May-01-2020

Code answers related to "select list after change event angular"

Code answers related to "Javascript"

Browse Popular Code Answers by Language