Ember-data-offline
Ember-data-offline is an addon that extends ember-data to work in offline mode.
It caches records in the local storage (IndexedDB or equivalents).
Installation
ember install ember-data-offline
Setup
First, define your application adapter with offline support:
//app/adapters/application.js ; ;
Then define a model and a serializer for it:
//app/serializers/application.js ; RESTSerializer;
If your primary key is different from 'id'
, you have to specify it in the adapter and serializer:
// in adapter: ;
For more information, please, take look at dummy app.
Details
All syncornizations between local storage and backend are queued and performed sequentially.
Contribution
- fork repo
git clone git@github.com:your-github/ember-data-offline.git
npm i && bower install
- add your feature
- cover with tests
- send PR!
License
[Licensed under MIT license] 1