Using the Angular Reactive Forms API, when markAsTouched()
function is called over a FormControl, the corresponding ion-touched class is not applied to the ion-item
(nor to the ion-input
). Only the ng-touched is applied.
This problem occurs with each of the markAs***
functions:
- markAsTouched
- markAsUntouched
- markAsDirty
- markAsPristine
- markAsPending
Angular Reactive Forms FormControl status classes (ng-XXX
) should be paired with the corresponding ion-XXX
classes on every FormControl status change.
This is not the first issue I’ve found regarding form control validations. Ionic 4 has a considerable room for improvement in this regard.