I\'m trying to figure out why my $watch isn\'t being triggered. This is a snippet from the relevant controller:
$watch
$scope.$watch(\'tasks\', functi
For one dimensional arrays you may use $watchCollection
$scope.names = ['igor', 'matias', 'misko', 'james']; $scope.dataCount = 4; $scope.$watchCollection('names', function(newNames, oldNames) { $scope.dataCount = newNames.length; });