Comment on page
Observables vs Promises
Observablesprovide us with abstractions that help us deal with the asynchronous nature of our applications. However, there are important differences between the two:
- As seen in the example above,
Observablescan define both the setup and teardown aspects of asynchronous behavior.
Observablescan be retried using one of the retry operators provided by the API, such as
retryWhen. On the other hand,
Promisesrequire the caller to have access to the original function that returned the promise in order to have a retry capability.