ground-db icon indicating copy to clipboard operation
ground-db copied to clipboard

Basic usage clarification

Open maxfi opened this issue 8 years ago • 1 comments

When in offline mode how do I know when the collections are ready?

  • Ground.isReady() appears to become true when a collection has successfully been grounded when online but doesn't become true when offline.
  • Ground.isResumed() appears to become true when the grounded collection is ready, even when offline, but appears to become true prior to the collections being fully loaded with data.

Also, could someone please clarify the following from the README:

Example of different patterns. Grounding a Meteor.Collection will attach the cache, resume and cross tabs update offline

Basically what I'm looking to achieve is to have all my collections cached (with all records) into localStorage so that when the app is loaded when offline (utilizing appcache) it works as it would normally whilst online. Ie, the user is able to make changes to collections etc which are then then synced when the client gets an internet connection. Is there anything other than grounding the collections that I need to do to get this to work?

maxfi avatar Feb 24 '16 09:02 maxfi

I've released 2.0.0-alpha.1 Notes about the new version, migration and what it doesn't do - Theres a loaded event, let me know what you think

raix avatar Apr 06 '16 05:04 raix