I have a page with a table that list orders, so i have in my OrdersIndexRoute
model: function(){
return this.get('store').query('order', {...});
}
Having that an order belongs to a product i want to add a select to filter orders for a selected product
I can have the products by calling this.get('store').query('product', {...});
but not sure what would be the proper place to do it, i think it's in the OrdersIndexController
but that's just my guess, maybe this could be placed in the route activate hook but don't know how to access it from controller, maybe there is a pattern for this kind of case but i have not found a good example or guide for it and how to do this avoiding to recall products every time the model gets reloaded.
Any help will be appreciated, Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire