1.2.1 • Published 9 years ago
ember-preferences v1.2.1
Ember Preferences
Easy way of managing user preferences on the client side with local storage (and other providers in the future)
Installation
$ ember install ember-preferencesDocumentation
See DOCUMENTATION.md.
Synopsis
import Ember from 'ember';
import preference from 'ember-preference';
export default Ember.Component.extend({
isVisible: preference('isVisible', { defaultValue: true }),
actions: {
onHide() {
this.set('isVisible', false);
}
}
});Every time isVisible is changed, the changes are stored in local storage. If you reload the page, the value is retrieved from local storage on get.
Development
Running
ember server- Visit your app at http://localhost:4200.
Running Tests
npm test(Runsember try:testallto test your addon against multiple Ember versions)ember testember test --server
Building
ember build
Project's health
License
ember-preferences is licensed under the MIT license.
See LICENSE for the full license text.