When displaying output, I need to show a specific number of decimal digits based on the length returned by a stored procedure. The length of these decimal digits can vary, and I only need to focus on the decimal part, not the integer part. To achieve this, I initially used the number pipe with a hard-coded value like this:
{{transaction.Rate | number :'.2-3'}}
This successfully displays the expected value: 713.753
(without the integer part).
However, I have a field in the transaction model called RateDecimal
. Instead of hard-coding '3' in the number pipe, I want to pass the value of this field:
{{transaction.Rate | number :'.2-{{transaction.RateDecimal}}'}}
Unfortunately, this throws an error. Can anyone provide guidance on how to achieve this? Your help is greatly appreciated.