Statistics
The Highest Post







Statistics
Count 94
Avg 21.00
Min 21
Max 21
Angualr Top questions

Details



Peter Agyekum How are observables different from promises? 1) Observable: Emits multiple values over a period of time. Lazy. An observable is not called until we subscribe to the observable. Can be cancelled by using the unsubscribe() method. Observable provides operators like map, forEach, filter, reduce, retry, retryWhen etc. 2) Promise: Emits a single value, Not Lazy(eager), Cannot be cancelled. The next difference is that Promises are always asynchronous. Even when the promise is immediately resolved. Whereas an Observable, can be both synchronous and asynchronous.
Related Topics