AngularJS $watch vs $watchCollection: which is better for performance?
$watch() will be triggered by: $scope.myArray = []; $scope.myArray = null; $scope.myArray = someOtherArray; $watchCollection() will be triggered by everything above AND: $scope.myArray.push({}); // add element $scope.myArray.splice(0, 1); // remove element $scope.myArray[0] = {}; // assign index to different value $watch(…, true) will be triggered by EVERYTHING above AND: $scope.myArray[0].someProperty = “someValue”; JUST ONE MORE … Read more