1.1.0 • Published 7 years ago

ng2bln-count-pipe v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

ng2bln-count-pipe

N|Solid

ng2bln-count-pipe is a simple to use ng2 pipe to be used to return the number of items in an array. See the test spec file shipped along this package for further details!

Installation

ng2bln-count-pipe requires Angular.io v2.x to run.

How to use it

The pipe takes no additional argument. It simply counts the items in an array. If it's being called upon anything else than an array, it returns NULL.

So in a Angular 2 template, simply use it this way: <span class="badge"> {{ itemsToCount | count }} </span>

License

MIT

Free Software

https://www.npmjs.com/~gdrahota