While working in Ember.Object land, you benefit from all the binding and computed property magic EmberJS has to offer. But what to do when you have to step outside its doors?
Ember.Object. You just have to make sure that all manipulations to the wrapped object are going through the wrapper, e.g. using
object.set(attribute, value) instead of
object[attribute] = value.
So, how about wrapping localStorage, so you can bind to its properties from other objects? Here's an example:
setUnknownProperty methods to sync the
Ember.Object's attributes with the ones of the native object. That's pretty much all there is to it.
If you have trouble finding the templates, they are in the HTML tab.
Here's a Gist if you prefer to view it that way.