intlpnIonic

Simple version of intl-phone number input for Ionic


License
MIT
Install
bower install intlpnIonic#0.1.7

Documentation

intlpnIonic

Simple version of intl-phone number input for Ionic

Heavily based on https://github.com/Bluefieldscom/intl-tel-input

Using https://github.com/Bluefieldscom/intl-tel-input inside Ionic framework creates incompatibilities, as by default, Ionic will handle scroll event which makes the phone number plugin not working, as the popup to choose a country is not scrollable. I only ported the parts i needed, so i removed the national mode code. Implemenation is dirty for now, as i need that as soon as possible.

Getting Started

  1. Install the requirements

  2. Link the stylesheet

    <link rel="stylesheet" href="path/to/intlpn.css">
  3. Add the javascripts

    <script src="path/to/intlpnIonic.js"></script>
    <script src="path/to/data.js"></script>
    <script src="path/to/lib/libphonenumber/build/utils.js"></script>
  4. load the directive and use it

    var app = angular.module('myApp', ['ionic','intlpnIonic'])...
    <intlpn ng-model="phone.number" placehoder="placeholder" only-country="['us','fr']"></intlpn>

Attributions