* @ngdoc service * @name $q * @requires $rootScope * * @description * A service that helps you run functions asynchronously, and use their return values (or exceptions) * when they are done processing. * * This is an implementation of promises/deferred objects inspired by * [Kris Kowal's Q]
()
| 15454 | * @returns {Promise} The newly created promise. |
| 15455 | */ |
| 15456 | function $QProvider() { |
| 15457 | |
| 15458 | this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) { |
| 15459 | return qFactory(function(callback) { |
| 15460 | $rootScope.$evalAsync(callback); |
| 15461 | }, $exceptionHandler); |
| 15462 | }]; |
| 15463 | } |
| 15464 | |
| 15465 | function $$QProvider() { |
| 15466 | this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) { |
nothing calls this directly
no test coverage detected