jeudi 23 mai 2019

Ember JS : How to reuse ember data while calling?

I have two models to call. In the first model I include somedate like this.

this.stroe.query('comment',{
   include : 'person,address'
});

And in the second call I include the same details that already stored in the store.

this.stroe.query('post',{
   include : 'person,address'
});

So, the API call takes a lot of time to resolve. Is there any way I can use the First API include data in the second API call to create a relationship between those two models(person, address). This would save a lot of time for me.

Anyone, please help me with this.

Note: Examples are testing purpose only.




Aucun commentaire:

Enregistrer un commentaire