angular-zipcode-filter
v1.0.0
Published
AngularJS filter to automatically format long and short zip codes.
Downloads
5
Readme
angular-zipcode-filter
AngularJS filter to automatically format long and short zip codes.
Installation
You can install the filter using Bower:
$ bower install angular-zipcode-filter
Or npm:
$ npm install angular-zipcode-filter
Then you have to include it in your HTML:
<script src="bower_components/angular-zipcode-filter/zipcode.js"></script>
<script src="node_modules/angular-zipcode-filter/zipcode.js"></script>
And inject the module angular-zipcode-filter
as a dependency in your application:
angular.module('webApp', ['angular-zipcode-filter']);
Usage
You can use it like any other AngularJS filter:
<p>{{ 028861617 | zipcode }}</p>
The output will be:
<p>02886-1617</p>
Testing
To run the tests:
$ npm install && bower install
$ grunt test