August 2017
Beginner to intermediate
370 pages
8h 37m
English
Before taking a look at how Promise is used in Angular, let's try and understand the concept related to Observable.
In JavaScript, Observable is an implementation of the Observer design pattern based on which there can be one or more objects which can choose to listen or observe (and hence, called as Observer) the change of state of another object (Observable). Observable, which is a stream of events, allows to pass multiple events, and, each of these events can be processed using a callback method. This is unlike Promise in which just a single event is processed as a result of an async operation completion status. An Observable is preferred over Promise due to the very fact that multiple events can ...
Read now
Unlock full access