使用ember-localstorage适配器。
App.store = DS.Store.create({
revision: 11,
adapter: DS.LSAdapter.create()
});您需要定义要用于客户端存储的适配器-
App.Store = DS.SyncStore.extend({
revision: 10,
adapter: DS.IndexedDB.adapter({
mappings: {
person: App.Person,
persons: App.Person,
contact: App.Contact,
contacts: App.Contact
}
})
});