Right now I have:
<button ng-click="doSomething()" ng-disabled="{{aVariable}} != 'Ready'">Button 1</button>
Where aVariable is initially set to 'Ready' and subsequently set to an integer then back to Ready.
But the button won't disable/enable based on the input.
ng-disabled
doesn't required interpolation directive {{}}
, you can directly use angular scope
variables inside directive for solving expressions
Markup
<button ng-click="doSomething()" ng-disabled="aVariable != 'Ready'">Button 1</button>
Hope this could help you, Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With