Skip to content

ember-montevideo/ember-preferences-exercise

Repository files navigation

ember-preferences

Steps

  1. Create preferences service that:
  • writes to local storage
  • reads from local storage
  • notifies when a preference changes
  1. Inject the service on all routes, controllers and components
  • create preferences mixin
  • create initializer and inject mixin to Route, Controller and Component
  1. Computed property
  • read from preferences
  • read default value
  • write to preferences
  • return value from set operation to update de cp
  1. Demo
  • add prop in the application controller and play with it

Exercises

  1. LocalStorage changed event
  2. Support more types of objects (with JSON.serialize/parse)
  3. Create get-preference helper

About

03/10/2016 Meetup exercise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published