I’m writing a tutorial where I show how to build an invoice application with push updates. The application assumes all money amounts are in cents to prevent rounding issues. Since humans prefer working with euros I made a custom component that transforms between cents and euros.
It accepts euro values as input and also displays them as euros but internally the amount is actually stored in cents.
I have it all working perfectly fine, a component wraps an input element and you only have to pass in an ID attribute (so labels work) and the desired value in cents. But I’m wondering if this can be accomplished in a simpler and more Ember like way.
So if you have any ideas on how to improve this example I would be very grateful!