1.0.0 • Published 10 years ago
angular-zipcode-filter v1.0.0
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-filterOr npm:
$ npm install angular-zipcode-filterThen 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 test1.0.0
10 years ago