How can I check if more than one checkbox is checked in my controller?
fiddle
My markup:
<li ng-repeat="item in Items">
<label>{{item.Name}}
<input type="checkbox" ng-model="item.Selected" />
</label>
</li>
My Code:
$scope.checkAll = function () {
//i want to check if checkbox checked more than 1
angular.forEach($scope.Items, function (item) {
item.Selected = $scope.selectedAll;
});
};