angular.js - How to verify a form with checkbox in angularjs?
为情所困
为情所困 2017-05-15 16:51:31
0
1
501

The html is as follows (just use it as an example, don’t mind the style):

<input type="email" name="email"> <textarea placeholder="Introduce yourself"></textarea> <input type="checkbox" ng-model="m1">Agree to trial terms <button>Submit application</button>

I just started learning angular. I would like to ask you, seniors, how to use angularjs to realize that the email and textarea are not empty, the checkbox is also checked, and the button can be clicked?

为情所困
为情所困

reply all(1)
Ty80

Suppose the ng-model settings of the three input textareas are m1 m2 m3, and then add ng-disabled='!m1||!m2||!m3' on the button

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template