EmberJS has a lot of features for helping you build a clean JavaScript interface. One of my favorites is the computed property; Ember can watch a property or set of properties and when any of those change, it recalculates a value that is currently displayed on a screen...
In my last project I needed to cacluate the sum of a few properties in an array. What I need is something that works like Ember.computed.alias('name') but allows me to transform the object instead of just aliasing a property...
This allows me to easily define a 'sum' for a property without a lot of duplication.
Your new post is loading...