In what scenario can we use Promises and Observables in the angular framework?
meda Changed status to publish 18/07/2022
Promise
always asynchronous
Promise emits a single value
Promises are not lazy
Promises cannot be canceled
Observable
either synchronous or asynchronous
return data many times as data change
lazy collections of multiple values over time
It’s a great approach for async operations
can be canceled using unsubscribe()
meda Changed status to publish 18/07/2022