Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function asyncOperation() {
// returns promise
}
// show blocking loading modal
asyncOperation()
.then(function() {
// all fine
}, function() {
// something went wrong
})
.finally(function() {
// on either case, we want to hide blocker
// and show the proper message
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment