Update Ionic page when provider data changes using Firebase

Thanks @rapropos. As per this link Ionic2 with Real-time data not updating(firebase)

There were fixes in Ionic2 beta 6 and we do not have to use NgZone. Now we are at Ionic 3 and trying to find out how much Ionic and change detection strategies have evolved and what is the best way to use it.

Observable? Subscribe? Factor?

Basically there are 2 solutions and I am looking for options

  1. declare an array in provider and populate it from Firebase. Then use the provider variable in all pages instead of copying it to local variable in each page so that when the provider object array is refreshed, all pages will get new data automatically.

OR

  1. create a function which returns a promise from Firebase and use the function to refresh local variables in each page but whenever provider data changes, all pages that reference it should be made aware and refresh their local variables again.