How can i count the number of errors on Form?
问题 FIDDLE How can i count the number of errors made on form ? HTML <div ng-show="form.$submitted && form.$invalid"> Sorry but 3 errors have been made. </div> 回答1: One way you could do this by using the specific count of a specific error criteria, required , pattern etc.. that are available as a part of form's $error[prop] array. In your case you could try using form.$error.required.length :- <div ng-show="form.$submitted && form.$invalid"> Sorry but {{form.$error.required.length}} errors have