I'm trying to pass results into a component and then have the component sort it:
// data passed to component
{
type: 'people',
res : [
{name: 'charlie', age: '55'},
{name: 'bobby', age: '19'},
{name: 'raymond', age: '39'}
]
}
// component
App.ShowResultsComponent = Ember.Component.extend({
// note sure how to set up array controller
sorted : Ember.ArrayProxy.create({
content : this.get('results.res')
}),
)}
I'm not sure if I'm missing/misunderstanding some fundamental, but is it possible to include an array controller as a property in a component? Any clarification would be appreciated.