I have a checkbox in my view
<input type="checkbox" ng-model="trackers[tracker._id].enable" ng-click="toggleTracker(tracker._id);"/>
And a function in my controller
$scope.toggleTracker = function(trackerId){
$scope.trackers[trackerId].enable = !$scope.trackers[trackerId].enable;
console.log($scope.trackers[trackerId].enable)
}
But each time I check the box the enable property does not change. What could be wrong with my code?