angular-libphonenumber
Advanced tools
Weekly downloads
Changelog
Include non-formatted binding
Includes a new variable for the directive that can be used to bind to the non-formatted version of the inputted phone number. Example:
<input id="phoneNumberTest" type="text" name="phoneNumberTest" ng-model="phoneNumber" phone-number
country-code="countrycode" non-formatted="nonFormattedPhoneNumber">
Where nonFormattedPhoneNumber
will be the phone number with no formatting applied.
Readme
Info | Badges |
---|---|
Version | |
License | |
Testing | |
Quality |
angular-libphonenumber is an angular directive that can be used as an input mask.
By default, all numbers are formatted in US format, but the format can be set with
the country-code
descriptor. It uses
nathanhammond/libphonenumber as a formatter
for phone number's, which calls
Google's libphonenumber
to format numbers as you type them.
View a demo here
Using Bower:
bower install --save angular-libphonenumber
You then must decide what version of libphonenumber you want. There are two included, and you must include one of them in your application before angular-libphonenumber:
<!-- Use either -->
<script src="./<path_to_bower_components>/angular-libphonenumber/dist/libphonenumber.full.js" />
<!-- OR -->
<script src="./<path_to_bower_components>/angular-libphonenumber/dist/libphonenumber.js" />
<!-- THEN -->
<script src="./<path_to_bower_components>/angular-libphonenumber/dist/angular-libphonenumber.min.js" />
Then include it in your angular application:
angular.module('myModule', ['cwill747.phonenumber']);
<input type="text" ng-model="countrycode" />
<input type="text" ng-model="phoneNumber" phone-number country-code="countrycode" />
If you are having any questions or issues getting things to work, you can:
Project's issue on GitHub should be used discuss bugs and features.
We welcome any contributions to the project. Please check the CONTRIBUTING.md for contribution guidelines.
Check out our contributors here
npm install -g gulp karma
npm install
while current directory is angular-libphonenumber repogulp
- this will run jshint
, test
, and build
targetsFAQs
Nathan Hammond's libphonenumber ported to an angular filter
The npm package angular-libphonenumber receives a total of 549 weekly downloads. As such, angular-libphonenumber popularity was classified as not popular.
We found that angular-libphonenumber demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.