core/common/bytes.pipe.ts
Converts the file size to a readable format. Usage:
Example : {{ myData | bytes }} <!-- e.g. 100.1 MB -->
Default precision is set to 1 decimal place. To change the precision, pass an additional argument to pipe.
Example :{{ myData | bytes: 5 }} <!-- e.g. 100.12345 MB -->
Name | bytes |
Standalone | true |
Static bytes |
bytes(bytes: number, precision: number)
|
Returns :
string | number
|
transform |
transform(value: number, precision: number)
|
Returns :
string | number
|