Model synchronization in localStorage and remotely in ember.js?

We are currently trying to decide between Backbone, Ember and Angular for the upcoming project. One thing that we would really like for this application is the ability of the application to save information on localStorage during battery life and synchronize with the server when it can connect again. We found something that will allow us to do this in Backbone ( https://github.com/lucian1900/Backbone.dualStorage ). Is this something done at Amber?

+5
source share
2 answers

I think that the ember-data-sync project does exactly what they ask, but it seems dead, and it does not update to work with the latest Amber version. :(

+1
source

I also thought about it, but I'm not sure if this is possible right now. This is definitely the goal of the ember-data command to have this in the future.

In theory, it should be just the same as when you find a stable network connection, switching model adapters to a RESTAdapter (or similar) from LocalStorageAdapter.

You can take a look at the method DS.Store.adapterForType- it was mentioned by Igor in his conversation at the Ember Camp when this kind of use (near the end of the video that I think):

0
source

All Articles