onvaluechange angular code example
Example 1: angular input onchange
<input (change)="saverange()"/>
Example 2: ngmodel change
<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 ...
}