core/common/bytes.pipe.ts
Converts the file size to a readable format. Supports both decimal (default) and binary units.
Usage:
Example :{{ myData | bytes }} <!-- e.g. 100.1 MB (decimal) -->
{{ myData | bytes:2 }} <!-- e.g. 100.12 MB (decimal) -->
{{ myData | bytes:1:true }} <!-- e.g. 97.7 MiB (binary) -->
{{ myData | bytes:{binary: true} }} <!-- e.g. 97.7 MiB (binary) -->
{{ myData | bytes:{precision: 2, binary: true} }} <!-- e.g. 97.66 MiB (binary) -->Options object properties:
Decimal units: bytes, kB, MB, GB, TB, PB Binary units: bytes, KiB, MiB, GiB, TiB, PiB
| Name | bytes |
| Standalone | true |
No results matching.