Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. $scope.$watch('cities', function(){
  2. alert("fire");
  3. }, true);
  4.  
  5. $scope.$watchCollection('[cities]', function(){
  6. alert("fire")
  7. }, true);
  8.  
  9. $scope.cityList = [cities];
  10.  
  11. $scope.$watchCollection('cityList', function () { alert('fire'); });
  12.  
  13. // As a response to some event:
  14. $scope.cityList[0] = newCities;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement