Sometimes I need to use $scope.$apply
in my code and sometimes it throws a \"digest already in progress\" error. So I started to find a way around this and foun
It is most definitely an anti-pattern now. I've seen a digest blow up even if you check for the $$phase. You're just not supposed to access the internal API denoted by $$
prefixes.
You should use
$scope.$evalAsync();
as this is the preferred method in Angular ^1.4 and is specifically exposed as an API for the application layer.