View Models

Ivy makes it easy to separate business logic from presentation logic. In this example, we create a Loan object, it knows how to calculate monthly payments, interest, and so on. The Loan object is entirely unaware of how money is formatted, this is handled by a LoanView object which wraps the Loan's attributes so they can be presented.


Your Loan:

Payment Details:

$320,000 per month
$320,000 total payment
$20,000 interest

HTML

JavaScript