GRowing GRowing - 7 months ago 39
AngularJS Question

Angularjs - Checkbox disabling and enabling

I am looking for a way to do exactly opposite from this example that was taken from angularjs ng-disabled documentation ...

In this example checking the box disables the button. I need exactly the opposite,,, I need the checked box to enable a disabled button. Can someone shed some light on this for me please.

<!doctype html>
<html ng-app>
<script src=""></script>
Click me to toggle: <input type="checkbox" ng-model="checked"><br/>
<button ng-model="button" ng-disabled="checked">Button</button>



You can do:


The ! means to do the opposite, so !true == false = true