[ADF-4152] Updated folder structure of core docs (#4415)

* [ADF-4152] Moved core library docs into subfolders

* [ADF-4152] Moved core library docs into subfolders

* [ADF-4152] Manual fixes to core doc file links

* [ADF-4152] Further automatic + manual link tidying
This commit is contained in:
Andy Stark
2019-03-12 14:20:20 +00:00
committed by Eugenio Romano
parent 285e56e9fb
commit 5fc05da7aa
121 changed files with 1112 additions and 1329 deletions

View File

@@ -0,0 +1,29 @@
---
Title: File Size pipe
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-14
---
# [File Size pipe](../../../lib/core/pipes/file-size.pipe.ts "Defined in file-size.pipe.ts")
Converts a number of bytes to the equivalent in KB, MB, etc.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
File Size: {{ sizeInBytes | adfFileSize:"2" }}
</div>
```
<!-- {% endraw %} -->
## Details
The pipe chooses the largest unit that is less than the total number of bytes and
divides the total by this number. This ensures that the number of units is greater
than 1 (eg, you will see "512 Bytes" rather than "0.5KB"). The pipe parameter indicates
the number of decimal places to use for the value, defaulting to 2 decimal places.