Angular2 ControlGroupChanges value on initial binding
I have a form with some widgets <input type="text"> , and I noticed that when using [ngFormModel] and ngControl when loading, ControlGroup.valueChanges is called upon initial data binding.
This means that the user believes that the form was changed at boot time.
Is it normal for me, or should I use another observable to track user changes?
I am using Angular2 RC3 and importing the following version for forms:
import {ControlGroup, Validators, FormBuilder} from '@angular/common'; I think once this works, however, if you just want to track if changes are made by the user, you should use ControlGroup.dirty or formControl.dirty with changes Observable.
ControlGroup.valueChanges.subscribe(() => { if(ControlGroup.dirty){ console.log('This change is made by User.'); } else { console.log('This change is Automated. before any User interaction.'); } })