angular-360-no-scope
angular-360-no-scope copied to clipboard
Add $watchGroup
Hey I was need also such behavior, and as I see its development is not in progress. Thus, here my solution for this issue:
ctrlImpl.prototype.$watchGroup = function () {
var args = arguments, watchExpr = args[0];
watchExpr.forEach(function (item,index,array) {
var getExpr = $parse(item);
array[index] = function () { return getExpr(instance); }
});
return $scope.$watchGroup.apply($scope, args);
}
Just add it inside angular-360-no-scope.js file after $watch prototype overriding. Hope this helps
Thank you, @sashberd!
Put this in a PR and I'll merge it!
I have no idea how to put this to PR so I leave this to you