Writing future proof components for Ember 2.0


#1

It’s a bit tricky to write and test Ember code during this in-between phase of having some (but not all) of Ember 2.0’s new patterns.

I’m specifically struggling with trying to mimic the forthcoming one-way behaviour of 2.0 in 1.13.2

Consider <my-component foo=foo />, where foo will be immutable

But:

{{my-component foo=foo}}

didInitAttrs() {
  this.set('foo', this.getAttr('foo'));
}

…foo is still mutable.

See this simple fiddle.

Is there an immutable helper for aid in the transition to Ember 2.0?