What is the difference between Promise
and Observable
in Angular?
An example on each would be helpful in understanding both the cases. In w
Both Promises and Observables will help us work with the asynchronous functionalities in JavaScript. They are very similar in many cases, however, there are still some differences between the two as well, promises are values that will resolve in asynchronous
ways like http calls. On the other hand, observables deal with a sequence of asynchronous events. The main differences between them are listed below:
promise:
observable:
Also, I've created the graphical image for you below to show the differences visually: