Would be a good practice to merge all properties of Item
:
{id: 1, priceId:1, property1:0}
with its corresponding Price
{id:1,seasonalPrice:123,regularPrice:120}
into:
{id:1,property1:0, price:{seasonalPrice:123,regularPrice:120}}
.
Ember most likely can handle linking and combining(merging) two jsons that arrive as two promises from backend REST API into one model. What is the best approach?
Aucun commentaire:
Enregistrer un commentaire