oschwald / angularjs-humanize-duration

AngularJS filter wrapping the 'humanize-duration' library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

angularjs-humanize-duration

Bower version

AngularJS filter wrapping the humanize-duration library.

Installation

Install via bower:

bower install [--save] angularjs-humanize-duration

Call from your index.html:

<script src="bower_components/humanize-duration/humanize-duration.js"></script>
<script src="bower_components/angularjs-humanize-duration/src/angular-humanize-duration.js"></script>

And then add it as a dependency:

var app = angular.module("myApp", ['angular-humanize-duration']);

Examples

{{ yourDuration | humanizeDuration }}

Or with parameters:

{{ yourDuration | humanizeDuration:{ round: true } }}

For more examples and information on how to use this filter take a look at the actual library on GitHub.

About

AngularJS filter wrapping the 'humanize-duration' library.

License:MIT License