Skip to content

data-doge/ng-q-all-settled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

ng-q-all-settled

adds Q's allSettled method to Angular's $q, using code from this gist by @Aaronius

install

npm install ng-q-all-settled

usage

require('angular')
require('ng-q-all-settled')

var exampleApp = angular.module('exampleApp', ['qAllSettled'])

exampleApp.controller('exampleController', ['$scope', '$q', function ($scope, $q) {

  $q.allSettled(promiseArray).then(function (settledPromiseArray) {
    // executed if all promises are resolved
  }).catch(function () {
    // executed if any promises are rejected
  }).finally(function () {
    // executed when all promises have settled
  })

}])

About

adds Q's allSettled method to Angular's $q

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published