Angular Promises vs Observables

Posted By : Vinay Tiwari | 30-Nov-2018

In this blog, we will learn about the difference between promises and observables. there are some differences between promises and observables.

A Promise emits a single event when an async activity finishes or fails.

An Observable is like a Stream (in many languages) and permits to pass at least zero or more events where the callback is required for every event.

Frequently Observable is preferred over Promise since it gives the highlights of Promise and more. With Observable it doesn't matter if you need to handle 0, 1, or various events. You can use the similar API for each case.


promise emits a single value

For example: 

const numberPromise = new Promise((resolve) => {

numberPromise.then(value => console.log(value));
// still prints only 5


Emits multiple values over a period of time


For example:

const numberObservable = new Observable((observer) => {;;

numberObservable.subscribe(value => console.log(value));
// prints 5 and 10

we can think of an observable like a stream which emits multiple values over a period of time and the same callback function is called for each item emitted so with an observable we can use the same API to handled asynchronous data. whether that data is transmitted as a single value or multiple values over some stretch of time.



  • A promise is Not Lazy
  • A Promise cannot be cancelled



  • Observable is Lazy. The "Observable" is slow. It isn't called until we are subscribed to it. 
  • An Observable can be cancelled by using the unsubscribe() method
  • An addition Observable provides many powerful operators like map, foreach, filter, reduce, retry, retryWhen etc.



About Author

Author Image
Vinay Tiwari

Vinay is a bright UI developer, having knowledge of HTML, CSS, Bootstrap, Jquery and AngularJs. His hobbies are interacting with people, listening music etc.

Request for Proposal

Name is required

Comment is required

Sending message..