0

I am getting confusion of observable and subscribe and promise in angular 8.How can I easily understand about observable,subscribe,promise. Anyone Can you explain about subscribe with observable? observable work as a data storage? If we use subscribe can we get bunch of value or single value one by one?

Kavitha K
  • 75
  • 1
  • 11
  • 1
    It would be better if you specified *what specifically* you are not understanding. – Igor May 05 '20 at 13:47
  • @Igor: Can you explain about subscribe with observable? observable work as a data storage? If we use subscribe can we get bunch of value or single value one by one? – Kavitha K May 05 '20 at 14:31
  • Subscribe + Observable: https://stackoverflow.com/q/51520584/1260204 – Igor May 05 '20 at 14:36
  • `If we use subscribe can we get bunch of value or single value one by one` ← Yes and Yes. – Igor May 05 '20 at 14:37
  • `observable work as a data storage` ← You can cache the result so that way it is only ever fired once using shareReplay. Then all subscribers get the same value every time. – Igor May 05 '20 at 14:38
  • If you have specific questions about 1 topic please create a new question and be detailed in that question. – Igor May 05 '20 at 14:38

0 Answers0