dimanche 15 février 2015

Ember - Using multiple models

I'm trying to create a GUI for changing lots of attributes for lots of different models, from the single route.


So I've read a little about using multiple models [here].1


To give me the following:



model: function() {

return Ember.RSVP.hash({
students: this.store.find('student'),
objectives: this.store.find('objective')
});
}


I was expecting that I could then display records etc with the following template code:



<h1>Objectives</h1>
{{#each objective in objectives}}
<p>{{objective.name}}</p>
{{/each}}


How should I access/display the records and their attributes in the template? Thanks





Aucun commentaire:

Enregistrer un commentaire