Angularjs Cheat Sheet: by Via
Angularjs Cheat Sheet: by Via
http://docs.angularjs.org/api/ng.directive:fo‐
rm.FormController
$q.all([array of promises])
Creates a Deferred object which represents a task which will
finish in the future.
$q. defer()
Creates a Deferred object which represents a task which will
finish in the future.
$q.reject(reason)
Creates a promise that is resolved as rejected with the
specified reason
$q.when( value)
Wraps an object that might be a value or a (3rd party) then-
able promise into a $q promise
Deferred.resolve( value)
Resolves the derived promise with the value
Deferred.reject(reason)
Rejects the derived promise with the reason
Deferred.promise
Promise object associated with this deferred
Promise.then(successCallback, errorCallback)
http://docs.angularjs.org/api/ng.$q