How do observables differ from promises in angular?
|1.||Observables are lazy i.e. they won't be executed until we subscribe them by subscribe() method.||Are not lazy i.e. they executed just after creation.|
|2.||They deal with multiple asynchronous events at a time.||Promises handle single asynchronous events at a time.|
|3.||You can cancel the subscription using the unsubscribe() method.||They are not cancellable.|
|4.||Observables deliver bugs to the subscribers.||It passes the errors to child promises.|
BY Best Interview Question ON 22 Sep 2021