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