Last active
March 29, 2021 09:12
Revisions
-
Aaronius revised this gist
Sep 19, 2014 . 1 changed file with 14 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,15 @@ angular.module('qAllSettled', []).config(function($provide) { $provide.decorator('$q', function($delegate) { var $q = $delegate; $q.allSettled = function(promises) { return $q.all(promises.map(function(promise) { return promise.then(function(value) { return { state: 'fulfilled', value: value }; }, function(reason) { return { state: 'rejected', reason: reason }; }); })); }; return $q; }); }); -
Aaronius renamed this gist
Sep 19, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Aaronius renamed this gist
Sep 19, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Aaronius created this gist
Sep 19, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ $provide.decorator('$q', function($delegate) { var $q = $delegate; $q.allSettled = function(promises) { return $q.all(promises.map(function(promise) { return promise.then(function(value) { return { state: 'fulfilled', value: value }; }, function(reason) { return { state: 'rejected', reason: reason }; }); })); }; return $q; });