Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/julianhille/angular-filesizeformat-filter

Filesizeformat filter for templates angularJS
https://github.com/julianhille/angular-filesizeformat-filter

Last synced: about 1 month ago
JSON representation

Filesizeformat filter for templates angularJS

Awesome Lists containing this project

README

        

angular-filesizeformat-filter
=============================

Filesizeformat filter for templates in angularJS

## Install
`$ bower install angular-filesizeformat-filter`

## Usages

In your app / module

```
angular.module('yourModule', ['jh.filesizeformat', ....
```

In your templates, you are able to use it as filter.

```
{{ size|filesizeformat:true:3 }}
```

### Parameters

```
function filesizeformat(bytes, binary, precision) ...
```

#### bytes
Size in bytes.

#### binary
SI value switch (KiB or kB).
binary == true -> KiB
default == false

#### precision
precision of floating point (count of decimal places)
<<<<<<< HEAD
=======

# TODO
Add tests with ( use travis)

>>>>>>> release/v1.0.2