Skip to content

Instantly share code, notes, and snippets.

@gsans
Created November 2, 2014 19:58
Show Gist options
  • Save gsans/b0a50f05d9c23beeaa60 to your computer and use it in GitHub Desktop.
Save gsans/b0a50f05d9c23beeaa60 to your computer and use it in GitHub Desktop.
var promise = deferred.promise;
//basic version
promise.then(fnSuccess)
.catch(fnFailure) //optional
.finally(fnAlways) //optional
//advanced version
promise.then(fnSuccess, fnFailure, fnNotification)
.catch(fnFailure) //optional
.finally(fnAlways) //optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment