ngValid
An AngularJS directive to trigger a method when an input is valid (or invalid).
The problem
This inside a controller:
if forminputName$valid
and also this:
$scope;
The solution
How to install it
- Bower:
bower install --save ng-valid
- HTML:
- AngularJS:
var app = angular;
How to use it
Just add the ng-valid
attribute and a method to be called when the input is valid:
You can also add the optional attribute ng-invalid
to invoke a method when the input is not valid:
License
See the LICENSE file.