SmoshySmosh / ng-intl-tel-input

AngularJS 1.4.x directive implementing intl-tel-input

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular intl-tel-input Directive

AngularJS 1.4.x module implementing the popular intl-tel-input jQuery Plugin

Circle CI

AngularJS Grunt Protractor Karma Jasmine JSHint JSCS ## What it does

Initialization

Validation

Operates as a normal validator for a form input based on the selected country.

Formatting

Assigns the final formatted telephone number to the ng-model binding.

Demo

http://smoshysmosh.github.io/ng-intl-tel-input/

Usage

Installation

With Bower

bower install smoshysmosh-ng-intl-tel-input --save

Manually

git clone https://github.com/smoshysmosh/ng-intl-tel-input.git

Provider setup and config

Inject ngIntlTelInput into your application module

var myApp = angular.module('myApp', ['ss.ngIntlTelInput']);

Directive usage

ng-intl-tel-input attribute

This attribute applies intl-tel-input to a text field.

<input type="text" ng-model="model.tel" ng-intl-tel-input>

Note

  • type is set to text or tel
  • ng-model is specified (required)

ng-intl-tel-input-options attribute

This attribute allows you to configure run-time settings.

<input type="text" ng-model="model.tel" ng-intl-tel-input ng-intl-tel-input-options="{initialCountry: 'gb'}">

Configure defaults

See: https://github.com/Bluefieldscom/intl-tel-input#options

About

AngularJS 1.4.x directive implementing intl-tel-input

License:MIT License


Languages

Language:JavaScript 83.5%Language:HTML 15.8%Language:Smarty 0.7%