我目前正在使用此管道 {{ product.productPrice | number:'.2-2' }}
{{ product.productPrice | number:'.2-2' }}
结果是1,000,000.00,但是我想删除“该.00怎么做”?
.00
用这个 :
{{product.productPrice | number: '1.0-0'}}
1.0-0表示:小数点前至少一位,小数点后至少0位。
https://angular.io/api/common/DecimalPipe
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
点击生成二维码
我来说两句