My goal is to get rid of the error messages with a button click. So I thought I'd just clear the field on button click and hence, get ride of the error. It worked in my very first test.
<div class="errorPopup"
data-ng-click="runner.Name = null"
data-ng-show="mainForm.name.$error.pattern">
<div class="triangle-down pull-left"></div>
<span>Only letters allowed.</span>
</div>
<input ng-model="runner.Name" data-ng-patter="/(a-z)\" required />
But now I have to click once.. clearing the field. then click twice before the error div is deleted.
I'd like to get rid of the field and the div in one click