Is there a way to subscribe to events on multiple objects using $watch
E.g.
$scope.$watch('item1, item2', function () { });
angularjsangularjs-watcheventsjavascript
Is there a way to subscribe to events on multiple objects using $watch
E.g.
$scope.$watch('item1, item2', function () { });
Best Answer
Starting from AngularJS 1.3 there's a new method called
$watchGroup
for observing a set of expressions.