Disable Angularjs button if checked

I have a button in the form that I would like to disable until one or more of the checkboxes is selected. This is probably pretty simple to solve, but the button doesn't turn off when I use it. Result.isSelected.

This is my button:

<button class="btn btn-success" ng-click="send()" ng-disabled="!result.isSelected" </button> 

And the checkbox:

 <input type="checkbox" class="checkbox-row" ng-model="result.isSelected" ng-click="selected()" /> 

Does anyone know of a better solution? Thank you for your help!

+6
source share
1 answer

The best solution would be:

 <input type="checkbox" class="checkbox-row" ng-model="checked" ng-click="selected()" /> <button class="btn btn-success" ng-click="send()" ng-disabled="!checked"> </button> 
+5
source

All Articles