angular select change
<select (change)="onChange($event.target.value)">
<option *ngFor="let i of devices">{{i}}</option>
</select>
onChange(deviceValue) {
console.log(deviceValue);
}
angular select change
<select (change)="onChange($event.target.value)">
<option *ngFor="let i of devices">{{i}}</option>
</select>
onChange(deviceValue) {
console.log(deviceValue);
}
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;
-----
-----
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us