valuechanges angular code example
Example 1: angular input onchange
<input (change)="saverange()"/>
Example 2: angular formgroup on value change
this.reactiveForm.get("firstname").valueChanges.subscribe(x => {
console.log('firstname value changed')
console.log(x)
})
Example 3: angular 9 form value changes
this.reactiveForm.get("firstname").valueChanges.subscribe(selectedValue => {
console.log('firstname value changed')
console.log(selectedValue)
console.log(this.reactiveForm.get("firstname").value)
})