i want to make the submit button active when user select one of the nested checkboxes but my script fails to works.
HTML
<div ng-controller="new_report_ctrl" class="list">
<form id="report" name="report" method="post">
<label class="item item-input item-stacked-label">
<ion-list ng-repeat="item in accounts">
<ion-checkbox ng-model="account_number">{{item.account_number}}</ion-checkbox>
</ion-list>
<label class="item item-input item-stacked-label">
<span class="input-label">Report</span>
<input type="text" ng-model="user_report" placeholder="Please enter your report here" required>
</label>
<br />
<p align="center"><button ng-disabled="!isChecked()" class="button button-positive" ng-click="report()" >Submit</button></p>
</form>
</div>
JS
$scope.customer_name=localStorage.getItem("customer_name");
$scope.username=localStorage.getItem("username");
$http.get('http://localhost/myapp/templates/user/accounts.php?username='+$scope.username).success
(function(data){
$scope.accounts=data;
console.log(JSON.stringify(data));
});
$scope.isChecked=function(){
return ($scope.account_number)
}
When i don't use ng-repeat on it the script works
$scope.accounts=JSON.parse(data);