I am trying to return a array promise to my model so that I can loop through the results in my template. I need the contact products to return as an promise array and not a promise object.
Model :
App.ContactEditorRoute = Ember.Route.extend({ model: function (params) { return Ember.RSVP.hash({ contact: this.store.find('contact', params.id), /*need this to return array not an object which is currently does*/ contactproducts: this.store.find('contactproduct',params.id), products: this.store.find('product') }) }
Template: (using emblem for markup)
each contactproduct in contactproducts p ' quantity contactproduct.quantity ' notes contactproduct.note
Aucun commentaire:
Enregistrer un commentaire