From 8820914c02ee9ea5f36cc2f23871312639759dcf Mon Sep 17 00:00:00 2001 From: Marian Morgalo Cabal Date: Mon, 6 Nov 2017 19:58:45 -0500 Subject: [PATCH] Fixing bug --- js/intlpnIonic.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/intlpnIonic.js b/js/intlpnIonic.js index 3047321..33de985 100644 --- a/js/intlpnIonic.js +++ b/js/intlpnIonic.js @@ -304,9 +304,9 @@ angular.module('intlpnIonic', ['ionic', 'ionic_filter_bar']) scope.isocode = scope.intlpnHelper.getFlagFromNumber( ngModelCtrl.$viewValue ); scope.countryIsoCode = scope.isocode; if( scope.national ) { - scope.phone = intlTelInputUtils.formatNumberByType(ngModelCtrl.$viewValue,scope.isocode,intlTelInputUtils.numberFormat.NATIONAL); + scope.phone = intlTelInputUtils.formatNumber(ngModelCtrl.$viewValue, scope.isocode, intlTelInputUtils.numberFormat.NATIONAL); } else { - scope.phone = ngModelCtrl.$viewValue; + scope.phone = intlTelInputUtils.formatNumber(ngModelCtrl.$viewValue, scope.isoCode, intlTelInputUtils.numberFormat.INTERNATIONAL); } }; //from view value (in ngModel directive) to model value (outside world) diff --git a/package.json b/package.json index 488da10..79f7e80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "intl-pn-ionic", - "version": "0.2.2", + "version": "0.2.3", "description": "Simple version of intl-phone number input for Ionic", "main": "js/intlpnIonic.js", "scripts": {