Retrieving data synchronously
How can I convert asynchronous mode to synchronous? Just by Subscribing? I am getting data from Firebase using Firebase API's and displaying them in my app but due to asynchronous mode, the display event occurs before the data is retrieved. I am shifting to using AngularFire but not sure if AngularFire by default uses asynchronous. I want to wait for the data before my program moves to executing next steps.
I am using Ionic2, have a provider which connects to Firebase, fetches data, stores in a local array in the provider with the ".then" method. The display page injects the provider and stores Firebase array data locally again in the display page, And then use the local variable in the html (ion-item) to display it. Basically, I want the data to be refreshed with any changes to Firebase data by any user.
@dkkishor please use StackOverflow for these types of general questions. Github is typically reserved for feature requests and bug reports.
Sure, Thanks.