One of the aspects that sets mobile applications aside from web applications is their offline availability.
This requires a couple of things:
-A small portion of the database should be cached on the device
-When a user makes changes, they should be synced when the device gets back online.
Knowing we mainly talk to REST API’s, does ionic provide any facilities towards this offline data management or what are the best practices for this?
Ionic is just the UI framework. It’s completely unrelated to data storage. In my app, I use ngStorage for storing some local data. It’s easy to use and works great if you are dealing with small pieces of data (current user, settings, etc).
If you’re dealing with lots of data and you need complex queries, synchronization and more, I suggest looking into PouchDB, and especially into its Replication feature. Replication allows you to sync data between the client-side database and the server-side database automatically.
UPDATE : NEVER MIND ! : The problem was mine. It was completely unrelated to ngStorage.
@alon_gubkin Do you have any trouble with ngStorage on actual devices? Including it as a dependency works great in Chrome. However, once I build the app, it dies on iOS and throws an error in AngularJS.