我正在使用Angular。严格要求我显示从后端获得的完整数字我在最后一个示例中知道零“ 123.450
与123.45
相同,但根据客户端,我们需要显示完整数字。
<td>{{ material.customerPrice | currency:'EUR':true}}</td>
Component:
this.material.customerPrice = "234.54530" // Output should be : 234.54530 not 234.5453
or
this.material.customerPrice = "12.5456540" // Output should be : 12.5456540 not 12.545654
小数点后没有固定数字。
我需要在可显示全位数的有角货币管道中添加任何其他参数。
currency:<Country Code>:<Symbol>:<min digits before the decimal>.<min digits after decimal>-<max digits after decimal>
因此,根据您的情况,您希望小数点后至少1位,小数点后至少3位,以及小数点后最多20位(用最大为20代替)
currency:'EUR':'symbol':'1.3-20'