ngDisable does not validate

1

Good morning. I have been trying to validate my form for a while, disabling Button when it is invalid. I've tried it in many ways, including researching here and following it as it was said. But it still did not work out.

<button type="button" class="btn btn-primary"  ng-disabled="!myForm.timeUpdateModel" data-ng-click="salvar();">Pesquisar</button>

I've tried using timeUpdateModel.$invalid , timeUpdateModel.$pristine , tried searching for the name of input timeUpdate.$invalid and even then none of them works. Can someone help me?

    
asked by anonymous 10.03.2017 / 14:13

1 answer

0

I use the following syntax:

form name + component name + property

ng-disabled="!myForm.inputName.$valid"

and the required must be in the input tbm.

    
10.03.2017 / 18:40