Sharing data between pages in app


#1

Hi, what is the best practice to share data between pages in my app? Is it better to use services, which holds data or for example event emitters? In the case of services, is it ok to access data directly or is it better to create getters and setters? Or for example expose properties in service as promises? And what about if i need, that data from services should be updated every time it changes. Can i expose some property in service as Observable, so when i subscribe to it, it will easily handle updating data in pages?

Thx for answer


#2

I like this approach using ReplaySubject and Observable: