I am using Reactive Forms in Angular. I want to do an operation when any form input is touched in a formGroup. As touched property of formGroup cannot be observed, how can I achieve a similar result?
I am currently watching for valueChanges but it does not trigger when a touch event occurs.
public ngAfterViewInit(): void {
this.accountForm.valueChanges.subscribe(() => {
this.displayMessage = this.genericValidator.processMessages(this.accountForm);
});
}