I have a form and I want to check if all the fields are valid or not.
Currently I am using four different methods. Nothing is working. Here is my plunker:
http://plnkr.co/edit/c4czI1W1fvXR4881SP1z?p=preview
Here are the methods I am using to check for validity
<button ng-click="my.$valid && validityCheck()">Update</button>
<div>myForm.$valid = {{myForm.$valid}}</div>
<span ng-show="myForm.$valid" style="color:green">Yippii!</span>
<span ng-show="myForm.$invalid" style="color:red">Not :(</span>
Plunkder code has few errors.
ng-click="myForm.$valid
function($scope){
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.