Do $scope.$emit()
and $scope.$broadcast()
operate synchronously or asynchronously in the literal sense?
For instance, consider these scenarios:
$scope.$emit()
console.log(" I am finished sending events");
and
$scope.$broadcast()
console.log(" I am finished sending events");
If all the listeners are synchronous (do not involve ajax calls, etc), will the logging only occur after all listeners have received their events?