2.1.2 • Published 6 years ago

@abcum/ember-storage v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

ember-storage

A utility for working with localStorage in an Ember.js app.

npm.io npm.io npm.io npm.io npm.io npm.io

Usage

Installation

ember install @abcum/ember-storage

Introduction

The ember-storage addon adds functionality for retrieving and manipulating localStorage key-value items from routes, controllers, templates, and components, enabling bound values and computed properties, whilst persisting data across page reloads.

Examples

Get the value for the localStorage['email'] key.

{{storage.email}}

Binding an input value directly to the localStorage['email'] key.

{{input type="text" value=storage.email}}

Using the storage service to get localStorage['email'] inside an Ember controller.

export default Ember.Controller.extend({
	actions: {
		login: function() {
			facebook.login( this.get('storage.email') );
		}
	}
})

Development

  • make install (install bower and ember-cli dependencies)
  • make upgrade (upgrade ember-cli to the specified version)
  • make tests (run all tests defined in the package)
2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.0.0

7 years ago