Looking at the calculations below, I am currently evaluating an expression, {{ annualIncome * 4.5 }}
, in one input and then re-evaluating the same expression in another input. Instead of saving the result and transferring it to the other input, I am repeating the calculation as I am unsure how to proceed.
For Example:
%label Equity Loan ({{ selectedLocation.loan }}%):
%input#equity_loan{ "disabled" => "disabled", "value" => "{{ selectedLocation.mortgage === 55 ? ((annualIncome * 4.5) / 11) * 9 : ((annualIncome * 4.5) / 15) * 4 }}" }
%label Mortgage ({{ selectedLocation.mortgage }}%):
%input#mortgage{ "disabled" => "disabled", "value" => "{{ annualIncome * 4.5 }}" }
I attempted to use ng-model but encountered difficulties making it work.
I also tried converting the values to currency by adding "| currency" at the end of my expression, which did not yield the desired outcome. I suspect this may be due to the need to convert each result individually