Use the ng-if attribute to check for $dirty on the tag that has ng-messages.
Example :
<div ng-messages="myForm.myControl.$error" ng-if="myForm.myControl.$dirty">
<div ng-message="required">Required field</div>
</div>
Use the ng-if attribute to check for $dirty on the tag that has ng-messages.
Example :
<div ng-messages="myForm.myControl.$error" ng-if="myForm.myControl.$dirty">
<div ng-message="required">Required field</div>
</div>