Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Let's you read the documentation anyway...
https://docs.angularjs.org/api/ng/directive/input
https://docs.angularjs.org/api/ng/directive/form
In addition to Sergei Protko's answer :
https://docs.angularjs.org/api/ng/directive/ngDisabled
example (2 required fields, 1 not) jsfiddle :
<form name="myForm" ng-submit="yourSubmitFun()">
<input type="text" ng-model="yourModel1" required />
<input type="text" ng-model="yourModel2" required />
<input type="text" ng-model="yourModel3" />
<button type="submit" ng-disabled="myForm.$invalid"> Submit form </button>
</form>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question