detect change on ngmodel code example
Example 1: ng model on change
<select [ngModel]="selectedItem" (ngModelChange)="onChange($event)">
Example 2: ng model on change
onChange(newValue) {
console.log(newValue);
this.selectedItem = newValue; // don't forget to update the model here
// ... do other stuff here ...
}