UPDATE: As Visualize noted in the comments, a native gethelper now exists . You should prefer this in accordance with the implementation below (which may not update correctly with new versions of Ember.)
, Handlebars ( , ). , , .
Ember.Handlebars.helper('getProperty', function(object, property, options) {
return Ember.get(object, property);
});
:
{{#each item in items}}
<tr>
{{#each colName in columnNames}}
<td>{{getProperty item colName}}</td>
{{/each}}
</tr>
{{/each}}
Ember , item colName.