samedi 21 février 2015

Retrieve data from multiple models

I've got a blog-post-editor.


The blog-post I'm editing is the model. Now I'd need all categories for the blog-post stored in a select-box.


What's the best way to retrieve and display those categories?


Currently I'd do it like this in the controller but they are about to be deprecated in Ember 2.0:



categories: function() {
return this.get('store').find('category');
}.property()

Aucun commentaire:

Enregistrer un commentaire