If I use Angular's $q, do I have to worry about using $evalAsyn or $apply? Or is that handled automatically by $q?
Commonly, you don't need to worry about the $digest/$apply/$evalSync things in angular. According to $q document here,
There is a short comparison:
There are two main differences:
Here is the source code in $q.
this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {
return qFactory(function(callback) { //invoke qFactory
$rootScope.$evalAsync(callback); //$evalAsync here...
}, $exceptionHandler);
}];
function $$QProvider() {
this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {
return qFactory(function(callback) {
$browser.defer(callback);
}, $exceptionHandler);
}];
}