$watch function can't catch changes ?????
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'));
Does this work for you?
changes.on('data', function(update) {
data.forEach(function(points) {
if($scope.paused) return;
points.values.push([
update.time,
update.usage[points.src]
]);
while(points.values.length > MAX && points.values.length > 1) {
points.values.shift();
}
points.values = angular.copy(points.values);
});
$scope.$apply();
});
https://github.com/strongloop/loopback-example-angular-live-set/blob/master/client/modules/chart/chart.controller.js#L36
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.