Created
February 15, 2022 05:10
-
-
Save saravanapriyanm/465e22e25934853f3958ed3237124a5f to your computer and use it in GitHub Desktop.
Promise and Observable dev mock response
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
// Promise | |
return new Promise((resolve, reject) => { | |
resolve(true); | |
}); | |
// RxJs Observable | |
return new Observable(subscriber => { | |
subscriber.next(true); | |
subscriber.complete(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment