javascript - Multiple variables using $watchGroup -


my watchgroup isnt working, gives me undefined, doing wrong in code?

 $scope.$watchgroup([vm.footer.nrrows, vm.issaved], function(current, original) {              console.log("nr rows "+current[0]);             console.log("is saved? "+current[1]);         }); 

change code this:

$scope.$watchgroup(["vm.footer.nrrows", "vm.issaved"], function() {    ... }, true); 

if variable $scope.something should put in $watch "something"


Comments

Popular posts from this blog

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -

scikit learn - python sklearn KDTree with haversine distance -