InterviewSolution
| 1. |
How can one use observables in Ionic? |
|
Answer» The RxJS LIBRARY EXPORTS a class called Observable. The RxJS library provides observables, which aren't specific to Ionic or Angular and are given by the RxJS library. Promises are comparable to observables, but observables can do a lot more. Rather than resolving a single value, it can deal with several values at once. You may even subscribe to an observable in order to change the DATA it contains. Observables are "lazy" in the sense that they will not be executed unless and until they are subscribed to. Observables can be modified and a new one RETURNED using a variety of procedures. Even better, you can make your own observable. With the help of a subject, the observable patterns are INTEGRATED into one, which is preferable for straightforward implementation. |
|