Try using distinctUntilChanged
as so.
this.myForm.valueChanges.pipe(distinctUntilChanged((a, b) => JSON.stringify(a) ===
JSON.stringify(b)))
.subscribe(changes => { console.log('The form changed!'); });
The JSON stringify is required as by default it only does a reference comparison. This way the code will only fire if the new value is different than the original.
Reference SO post: FormControl.detectchanges - why use distinctUntilChanged?
Here is a stackblitz that shows that this fires only on changes to form control, which validates that this is an acceptable solution: https://stackblitz.com/edit/angular-zena7t?file=src/app/app.component.html
You can tap into the changes
variable to see exactly what changed. This way you can also have different behaviors set up if different inputs are changed. Though if for whatever reason you do want to trigger a change from the code and not have it cause a emitting of values then do it as MGX has shown in their answer, though at that point I would ask why are you overriding its default behavior of emitting a value change?