Skip to content
This repository has been archived by the owner on Oct 14, 2019. It is now read-only.

blockchain/bc-phone-number

Repository files navigation

bc-phone-number Build Status

Installation

Bower

bower install --save bc-phone-number
angular.module('myApp', ['bcPhoneNumber'])

NPM

npm install --save bc-phone-number
angular.module('myApp', [require('bc-phone-number')])

Other (not recommended)

Just download the dist folder.

Usage

<bc-phone-number ng-model='theNumber' default-country='us' preferred-countries='us gb ca' is-valid='isValid'></bc-phone-number>
angular.module('myModule', ['bcPhoneNumber', function(bcPhoneNumber) {

  scope.formattedNumber = bcPhoneNumber.format('966501234567');
  scope.isValid = bcPhoneNumber.isValid(scope.formattedNumber);
}]);

Note thatng-model and is-valid are scope variables.

Release

Build a new version:

gulp build

Update version in bower.json and package.json and commit:

git commit -a -m "Release 5.0.8"

Tag, sign and push:

git tag -s v5.0.8 -m "v5.0.8"
git push --tags