0 votes
in Angular by

What is the difference between promise and observable?

1 Answer

0 votes
by

Below are the list of differences between promise and observable:

Observable Promise

Declarative: Computation does not start until subscription, so they can run whenever you need the result Executes immediately on creation

Provides multiple values over time Provides only one

Subscribe method is used for error handling that facilitates centralized and predictable error handling Push errors to the child promises

Provides chaining and subscription to handle complex applications Uses only .then() clause

...