I have a button on a form that I'd like to disable until one or more checkboxes have been selected. This is probably fairly simple to solve, but the button is not disabled when I use !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? Thanks for your help!
A better 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>
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