Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 379 Bytes

localStorage.md

File metadata and controls

23 lines (19 loc) · 379 Bytes

local Storage

This saves your collections or models to localStorage. Here is an example in the model:

ko.Model.extend({
    name: 'myModelName',
    options: {
        storage: 'localStorage'
    }
})

This is how to set it up in a collection:

ko.Collection.extend({
    name: 'myCollectionName',
    options: {
        storage: 'localStorage'
    } 
});