What is main difference between observable and promise?
Gajendra Jangid
Both observables and promises help us work with asynchronous functionality. The core difference is promises deal with one asynchronous event at a time, while observables handle a sequence of asynchronous events over a period of time.
Observables:Emit multiple values over a period of time.Not executed until we subscribe them.Cancellable, which stops the listener from receiving further values.Hand over errors to the subscribers.
Promises:Emit a single value at a time.Execute immediately after creation.Not-Cancellable.Push errors to their child promises.