Nav apraksta

Thiranon Wiriyanurakkul 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
..
example 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
src 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
.bower.json 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
.gitignore 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
LICENSE 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
README.md 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
bower.json 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ
package.json 86d81d25b9 แก้หน้า index_page.html และ menu.html 8 gadi atpakaļ

README.md

angularjs-humanize

angularjs-humanize is a thin wrapper around the humanize library, providing a variety of Angular filters which apply transformations to make data more human-readable.

Installation

Install the library via

bower install -S angularjs-humanize

Add it to your index.html:

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

Add it as a dependency to your angularjs project:

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

Supported Filters

angularjs-humanize currently supports the following filters, mapping to the humanize functions of the same name:

  • humanizeFilesize, which transforms a number or number-like string into a human-readable filesize such as "225.35 KB"
  • humanizeOrdinal, which transforms an integer into an ordinal such as "32nd" or "101st"
  • humanizeNaturalDay, which transforms an integer representing an epoch into a date representation or one of "yesterday", "today", or "tomorrow"
  • humanizeRelativeTime, which transforms an integer representing an epoch into a string such as "about an hour ago" or "in a month"

License

Copyright © 2014 Say Media Ltd. All Rights Reserved. See the LICENSE file for distribution terms.