Ask all your coding questions @ codequery.ioObservable vs Promise | What's the difference?
Observables are able to emit multiple values. Observables are designed to evaluate streams of data over time.
Whether its an API call or a simple iteration, Observables can use the same instance to subscribe to multiple events.
While it's possible to create your own implementation of the observer design pattern, most applications leverage the RxJs implementation of Observables.
If your project is Node based or you are using React/Angular then it's a lot easier to implement Observables with RxJs using npm etc.
You can effectively cancel an Observable by unsubscribing. When you unsubscribe to an Observable, you can terminate any pending async activity. This is not possible with a Promise where a single event is always rejected/resolved.
Using Observables follows reactive programming techniques. Observables allow you to respond to both sync/async events as they happen over time.
Angular leverages the RxJs library. Using Observables in Angular is almost unavoidable and should be embraced.
Unlike a Promise, an Observable can behave both sync and async.
The RxJs library includes a bunch of operators. Operators allow you to gracefully mutate streams of data as values are emitted over time.
Some of the more popular operators include filter(), map(), and mergeMap().