0.1.0 • Published 9 years ago
ember-object-at-helper v0.1.0
ember-object-at-helper

HTMLBars template helper to lookup an element of an array.
Usage
Ember.Component.extend({
whistleblowers: [
{ name: 'Edward Snowden' }
],
directors: ['Laura Poitras'];
documentaries: [
{ title: 'Citizenfour' }
]
key: 'title'
});Simple examples:
{{object-at whistleblowers 0 'name'}}= Edward Snowden{{object-at directors 0}}= Laura Poitras
Complex example:
{{#each whistleblowers as |whistleblower index|}}
{{object-at directors index}} produced the great documentary
{{object-at documentaries index key}} about {{whistleblower.name}}.
{{/each}}Installation
ember install ember-object-at-helper
Running Tests
npm test(Runsember try:testallto test your addon against multiple Ember versions)ember test
0.1.0
9 years ago