(function(angular, window) {

  'use strict';

  angular
    .module('mwl.bluebird', [])
    .constant('Bluebird', window.P.noConflict())
    .config(function($provide, Bluebird) {

      //Make bluebird API compatible with angular's subset of $q
      //Adapted from: https://gist.github.com/petkaantonov/8363789

      Bluebird.defer = function() {
        var b = Bluebird.pending();
        b.resolve = angular.bind(b, b.fulfill);
        b.reject = angular.bind(b, b.reject);
        b.notify = angular.bind(b, b.progress);
        return b;
      };

      Bluebird.reject = Bluebird.rejected;
      Bluebird.when = Bluebird.cast;

      var originalAll = Bluebird.all;
      Bluebird.all = function(promises) {

        if (angular.isObject(promises) && !angular.isArray(promises)) {

          var promiseArray = [], promiseKeysArray = [];
          angular.forEach(promises, function(promise, key) {

            promiseKeysArray.push(key);
            promiseArray.push(promise);

          });

          return originalAll(promiseArray).then(function(results) {

            var objectResult = {};
            angular.forEach(results, function(result, index) {
              objectResult[promiseKeysArray[index]] = result;
            });
            return objectResult;

          });

        } else {
          return originalAll(promises);
        }

      };

      Bluebird.onPossiblyUnhandledRejection(angular.noop);

      $provide.decorator('$q', function() {
        return Bluebird;
      });

    }).run(function($rootScope, Bluebird) {

      Bluebird.setScheduler(function(cb) {
        $rootScope.$evalAsync(cb);
      });

    });

}(angular, window));

@@ -780,25 +780,24 @@
 romises)) %7B%0A
-%0A
           va
@@ -798,552 +798,102 @@
     
-var promiseArray = %5B%5D, promiseKeysArray = %5B%5D;%0A          angular.forEach(promises, function(promise, key) %7B%0A%0A            promiseKeysArray.push(key);%0A            promiseArray.push(promise);%0A%0A          %7D);%0A%0A          return originalAll(promiseArray).then(function(results) %7B%0A%0A            var objectResult = %7B%7D;%0A            angular.forEach(results, function(result, index) %7B%0A              objectResult%5BpromiseKeysArray%5Bindex%5D%5D = result;%0A            %7D);%0A            return objectResult;%0A%0A          %7D);%0A%0A        %7D else %7B%0A          return originalAll(
+return Bluebird.props(promises);%0A        %7D else %7B%0A          return originalAll.call(Bluebird, 
 prom

Use built in functionality for calling Promise.all on an object of promises