xxxxxxxxxx
<select [ngModel]="selectedItem" (ngModelChange)="onChange($event)">
onChange(newValue) {
console.log(newValue);
this.selectedItem = newValue; // don't forget to update the model here
// ... do other stuff here ...
}
xxxxxxxxxx
<input type="checkbox" (ngModelChange)="myModel=$event" [ngModel]="mymodel">
xxxxxxxxxx
<select [(ngModel)]="selectedItem" (ngModelChange)="onChange($event)">
xxxxxxxxxx
<select [ngModel]="selectedItem" (ngModelChange)="onChange($event)">
xxxxxxxxxx
<select [(ngModel)]="selectedItem" #item (change)="onChange(item.value)">
xxxxxxxxxx
onChange(newValue) {
console.log(newValue);
this.selectedItem = newValue; // don't forget to update the model here
// ... do other stuff here ...
}