I have an ember component which represents a purchase form. You can create old purchase payed in other currency. The converted amount of the purchase depends on the currency chosen and the date of the purchase. So the converted amount is my computed property. The source of the exchange rates is a model backended by an external web service through a custom adapter and they are retrieved by date. This means that when the date changes in the form I may need to call the service. All this happen in the computed property but I know that loading data in it in not a best practice, so I wonder what alternatives I have.
Aucun commentaire:
Enregistrer un commentaire