Giter VIP home page Giter VIP logo

ng-intl-tel-input's Introduction

ng-intl-tel-input

AngularJS 1.5.x module implementing intl-tel-input directive (https://github.com/Bluefieldscom/intl-tel-input)

Build Status

What it does

Initialization

ngIntlTelInputProvider is available to set configs in the module config phase.

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://hodgepodgers.github.io/ng-intl-tel-input/

Usage

Installation

With NPM

npm install ng-intl-tel-input --save

With Bower

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

Manually

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

Provider setup and config

Inject ngIntlTelInput into your application module

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

Configure defaults

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

angular.module('myApp')
  .config(function (ngIntlTelInputProvider) {
    ngIntlTelInputProvider.set({initialCountry: 'us'});
  });

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)

data-default-country attribute

This attribute allows run-time setting of the default country.

<input type="text" ng-model="model.tel" ng-intl-tel-input data-initial-country="gb">

ng-intl-tel-input's People

Contributors

bighappyface avatar syntaxstacks avatar komachi avatar imbdb avatar jrthib avatar skfd avatar p-m-p avatar vogloblinsky avatar avif avatar gergderkson avatar

Watchers

Miguel Vitorino avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.