angular-live-set icon indicating copy to clipboard operation
angular-live-set copied to clipboard

$watch function can't catch changes ?????

Open ghost opened this issue 10 years ago • 5 comments

Hi,

in the angular-liveset-example https://github.com/strongloop/angular-live-set-example I add $watch function to see the changes in the Live Set object "colors", however, $watch function not catching any changes !!!

any idea how to catch changes ?

Please help me

$scope.$watch('colors', function(newValue, oldValue) {
    console.log('update set')); 

ghost avatar Jan 20 '16 07:01 ghost

Hi, i can see the changes.

$scope.$watch('colors', function(newValue, oldValue) { console.log('update set'); });

gjseminario avatar Feb 16 '16 11:02 gjseminario

@yasser-kfupm I also faced similar issue.. watch function was not firing.. it is mentioned here.. here i added a true as the third parameter and started working ..

allupaku avatar Feb 19 '16 16:02 allupaku

try $scope.$watchCollection

BoLaMN avatar Mar 04 '16 15:03 BoLaMN

@yasser-kfupm Did the above suggestions work for you?

0candy avatar Mar 28 '16 18:03 0candy

Closing this issue due to inactivity.

dhmlau avatar Jun 13 '18 02:06 dhmlau