lundi 11 février 2019

How to retrieve the same model from another REST url in EmberJS

The models tree of my emberJS app match the tree of my API however, I have 2 different routes returning the same type of data :

/products/ and /users/:id/supported_products/ both return products data.

When I need to have the products of the app there is no problem :

 this.store.query('product',params);

However I am not sure how to query products from the user path. The place to do so would be the adapter, but I need to define a secondary adapter that I would call when I need supported products,and I have no idea how to do so.




Aucun commentaire:

Enregistrer un commentaire