I'm trying to disable submitting the form until all fields are filled.
I've tried adding the disable option in the button but it doesn't work.
This is the form:
<form id="contactForm" name="contactForm" novalidate>
<input type="text" name="contactName" id="contactName" placeholder="Nombre" data-ng-model="cu.contactName" ng-model-options="{ updateOn: 'blur' }" required autofocus>
<span style="color:red" ng-show="contactForm.contactName.$dirty && contactForm.contactName.$invalid">
<span ng-show="contactForm.contactName.$error.required">El nombre es requerido.</span>
</span>
<button class="hvr-bounce-to-right" type="submit" ng-disabled="contactForm.contactName.$dirty && contactForm.contactName.$invalid" name="submit-form" ng-click="cu.sendMail()">Enviar mensaje   <span class="icon flaticon-envelope32"></span></button>
</form>
Right now, the button gets disabled when I start typing and then deletes everything in the input, when I try to click, it gets disabled, but what I want is that the button is disabled since the beginning and then when you fill the inputs it gets unlocked or un-disabled(if that's a word).
Please help, thanks!