Saved Bookmarks
| 1. |
What do you mean by observables and promises? |
|
Answer» Promises HELP to FUNCTION with asynchronous operations. They work in two conditions. They either return a single value when the promise resolves or an error message when the promise gets rejected. Whenever a request is made from a promise, it becomes a non-cancellable COMMAND. On the other hand, observable can be REGARDED as a stream. It can be anything, a stream of data or events. It can be CANCELED, unlike promise. An observable can be easily converted into a promise by specifying a command “toPromise( )” with the command to do so. Also Read: How to negotiate a higher salary after a job offer |
|