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

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

css - SVG using textPath a symbol not rendering in Firefox -

order - Notification for user in user account opencart -