I need to dynamically display certain amounts based on the comparison of two interest values. Here is the logic:
<td *ngIf="subTable.flexitaxMaxPaymentDate">
subTable.flexitaxMaxInterest > subTable.IRDInterest ? {{subTable.maxAmountWithTmnzInterest | formatNegativeNumber}} ({{subTable.flexitaxMaxInterest | formatNegativeNumber}}) : ''
</td>
Basically, if flexitaxMaxInterest
is higher than IRDInterest
, I want to show
{{subTable.maxAmountWithTmnzInterest | formatNegativeNumber}} ({{subTable.flexitaxMaxInterest | formatNegativeNumber}})
inside the <td>
. If the condition is false, I want to display an empty string.
The problem I'm facing is that when the table is rendered, it shows:
subTable.flexitaxMaxInterest > subTable.IRDInterest ? $926 ($26) : ''
which is not the desired output. I've tried different approaches but haven't been successful. Can anyone suggest the best way to achieve what I'm looking for?