select onchange pass option value in angular 6
snippet in javascript

select onchange pass option value in angular 6

user7887

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

onChange(deviceValue) {
    console.log(deviceValue);
}