My angular application have only check box and radio button. I want to trigger event when any of the field has been made dirty by user. currently the below if condition called even value has been changed by program itself. I used touched and pristine attribute but it always giving me false
this.myForm.valueChanges.subscribe(data => {
if (this.myForm.dirty) {
console.log('form is dirty');
}
});