I am looking the correct ember
recommendation approach to group my data values before i send to template.
Because I have the data in 2 different arrays.
I don't want to keep no.of iterators across the app. so I would like to group the data within newly creating/created array or the correct way ember recommends. any one help me?
my model : ( sample )
import Ember from 'ember';
export default Ember.Route.extend({
model(){
return {
"data" : {
"group" : [{"group":"newGroup"}, {"group":"oldGroup"}],
"details" : [{"name":"arif","age":"3"}, {"name":"afi","age":"2"}]
}
}
}
});
my hbs : / - how to show this? by equal array value?/
<li> -- </li>
</ul>
Aucun commentaire:
Enregistrer un commentaire