AngularJS filter to automatically format long and short zip codes.
GPL-2.0 License
AngularJS filter to automatically format long and short zip codes.
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']);
You can use it like any other AngularJS filter:
<p>{{ 928861617 | zipcode }}</p>
The output will be:
<p>92886-1617</p>
To run the tests:
$ npm install && bower install
$ grunt test