FE/Angular

[ ANGULAR ] Decimal Pipe

HEON.D 2021. 3. 9. 11:45

{{3.6 | number: '1.0-0'}}

<!--will output '4'-->

 

{{-3.6 | number:'1.0-0'}}

<!--will output '-4'-->

 

소수점 두자리 표현

{{ 33.123234234 | number : '1.2-2' }}