ember-preferences

1.2.1 • Public • Published

Ember Preferences

Build Status Latest version Ember versions

Easy way of managing user preferences on the client side with local storage (and other providers in the future)

Installation

$ ember install ember-preferences

Documentation

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

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

Project's health

Build Status Codacy Badge Ember Observer Score

License

ember-preferences is licensed under the MIT license.

See LICENSE for the full license text.

Readme

Keywords

Package Sidebar

Install

npm i ember-preferences

Weekly Downloads

97

Version

1.2.1

License

MIT

Last publish

Collaborators

  • san650