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

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -