How to make ngMessage for required fields only show when dirty or submitting a form?

前端 未结 12 2483
一个人的身影
一个人的身影 2020-12-08 02:31

I\'m using AngularJS 1.3.0 RC0 and angular-messages. ng-messages dutifully shows error messages for those \"required\" fields when a form is initially loaded and pristine. S

12条回答
  •  醉梦人生
    2020-12-08 02:42

    Do the error messages still appear after you have satisfied their conditions? In that case, have you remembered to take a dependency on ngMessages in your angular module? E.g.:

    angular.module("exampleModule", ["ngMessages"]);
    

提交回复
热议问题