javascript - Checkbox ng-click fired twice -
i trying fill checkboxes dynamically , use selected items filter data. my html <div class="form-group" ng-repeat="category in categories"> <label class="checkbox" > <input type="checkbox" ng-model="selection.ids[category.code]" id="{{category.code}}" ng-click="toggleselection(category)" /> {{category.description}} </label> </div> <div class="form-group"> <button type="submit" ng-click="filtersubmit();" class="btn btn-default"> <span class="glyphicon glyphicon-search"></span> filter </button> </div> in controller using javascript, not unlike other examples i've seen. $scope.toggleselection = function (category) { var idx = $scope.selection.indexof(category); console.log('start '+ idx); // selected if (idx > -1) { $scope.se...