Imagine we have an external module has a function that needs a callback parameter for a async task. As our parameter is a function, and they call that callback function in their module, so how do we use $scope that is out of our digest cycle? How angularjs handles such things?
And also we use $scope.apply() or $scope.digest() in such situations, so how do they work?
Note: I don't need you to provide some codes necessarily, just want to know about concepts. Thanks.