Guest User

Untitled

a guest
Apr 25th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. private watchFormUpdates(): void {
  2. this.reactiveForm.valueChanges
  3. .pairwise()
  4. .map(([prev, curr]) => Object.keys(curr).find(key => prev[key] !== curr[key]))
  5. .subscribe(key => console.log(key, this.reactiveForm.controls[key].value));
  6. }
Add Comment
Please, Sign In to add comment