How can I hide a span if an input field is valid with AngularJS? -
i can this:
<span ng-show="form.size.$error.integer">problem</span> but have number of different possible errors there way can hide span if field valid?
you can use $valid property of form.
<span ng-show="form.size.$error.integer && ! form.size.$valid">problem</span> but im not sure why need this. if there no error, form.size.$error.integer should false , should hidden anyways.
Comments
Post a Comment