0.1.2 • Published 9 years ago
ng-only-intl-phone v0.1.2
ng-only-intl-phone
Installation
Bower
bower install --save ng-only-intl-phoneangular.module('myApp', ['ngIntlPhone'])NPM
npm install --save ng-only-intl-phoneangular.module('myApp', [require('ng-only-intl-phone')])Other (not recommended)
Just download the dist folder.
Usage
<ng-intl-phone ng-model='theNumber' default-country='us' preferred-countries='us gb ca' is-valid='isValid'></ng-intl-phone>angular.module('myModule', ['ngIntlPhone', function(ngIntlPhone) {
scope.formattedNumber = ngIntlPhone.format('966501234567');
scope.isValid = ngIntlPhone.isValid(scope.formattedNumber);
}]);Note that ng-model and is-valid are scope variables.
Release
Build a new version:
gulp buildUpdate version in bower.json and package.json and commit:
git commit -a -m "Release 1.0.0"Tag, sign and push:
git tag -s v1.0.0 -m "v1.0.0"
git push --tags