Angular Reactive forms : how to get just changed values
You can check all controls for dirty-flag. See https://angular.io/api/forms/FormControl
getDirtyValues(form: any) {
let dirtyValues = {};
Object.keys(form.controls)
.forEach(key => {
let currentControl = form.controls[key];
if (currentControl.dirty) {
if (currentControl.controls)
dirtyValues[key] = this.getDirtyValues(currentControl);
else
dirtyValues[key] = currentControl.value;
}
});
return dirtyValues;
}