Created
January 11, 2017 05:45
-
-
Save doron2402/670490e3ff826492229fc1cf335767ca to your computer and use it in GitHub Desktop.
Running promises one after the other
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p1.then((result) => { | |
// do something return something | |
}).then((result1) => { | |
// do something return something | |
}).then((result2) => { | |
// do something return something | |
}).catch((error) => { | |
// if there's an error will catch it here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment