All Projects → gauravsoni119 → Ng2 Tel Input

gauravsoni119 / Ng2 Tel Input

Licence: mit

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Ng2 Tel Input

Angular websockets security
AngularJS, Websockets, Restful, Spring, Spring Security, Hibernate, Bootstrap, Gulp in ES6, Maven
Stars: ✭ 11 (-78%)
Mutual labels:  gulp
Nusmods Api
National University of Singapore Modules API (Unofficial)
Stars: ✭ 34 (-32%)
Mutual labels:  gulp
Vue Express Webpack Gulp
使用Vue,Express,Webpack,gulp搭建的自动化电影库项目
Stars: ✭ 42 (-16%)
Mutual labels:  gulp
Gulp Insales Uploader
🚲
Stars: ✭ 15 (-70%)
Mutual labels:  gulp
Jekyll Boilerplate
Helpful files to get started working on a new Jekyll website
Stars: ✭ 30 (-40%)
Mutual labels:  gulp
Dough
React/Redux + SASS + Gulp/Browserify/Babel skeleton codebase with demo application.
Stars: ✭ 38 (-24%)
Mutual labels:  gulp
Gulp Xslt
XSLT transformation plugin for gulp
Stars: ✭ 9 (-82%)
Mutual labels:  gulp
Generator Gulp Plugin Boilerplate
Scaffold out a Gulp plugin boilerplate
Stars: ✭ 46 (-8%)
Mutual labels:  gulp
Electra
A desktop application for test account managment
Stars: ✭ 32 (-36%)
Mutual labels:  gulp
Remark Boilerplate
A boilerplate to create presentations using remark, Gulp, Stylus and more.
Stars: ✭ 41 (-18%)
Mutual labels:  gulp
Houl
Full-contained static site workflow
Stars: ✭ 27 (-46%)
Mutual labels:  gulp
Teanblog
📄 Simple blog platform based on Egg.js
Stars: ✭ 29 (-42%)
Mutual labels:  gulp
Sbt Play Gulp
Gulp asset pipeline for Play Framework
Stars: ✭ 38 (-24%)
Mutual labels:  gulp
Magic
CSS3 Animations with special effects
Stars: ✭ 7,253 (+14406%)
Mutual labels:  gulp
Gulp Bootlint
A gulp wrapper for Bootlint, the HTML linter for Bootstrap projects.
Stars: ✭ 42 (-16%)
Mutual labels:  gulp
Use Gulp
gulp资料收集
Stars: ✭ 858 (+1616%)
Mutual labels:  gulp
Generator Fountain Webapp
Yeoman 'fountain' generator to start a webapp
Stars: ✭ 985 (+1870%)
Mutual labels:  gulp
Generator Buildabanner
Yeoman workflow to get a standard or DoubleClick banner started quickly.
Stars: ✭ 49 (-2%)
Mutual labels:  gulp
Express Mvc Boilerplate
A simple mvc boilerplate for express.js (gulp + expressjs + nodemon + browser-sync)
Stars: ✭ 46 (-8%)
Mutual labels:  gulp
Poster
A beautiful canvas poster
Stars: ✭ 40 (-20%)
Mutual labels:  gulp

This repository is no longer maintained.

Angular 2+ wrapper for intl-tel-input

Installation

Run following command to install ng2-tel-input

npm install ng2-tel-input intl-tel-input --save

After install, you need to add intlTelInput.css, intlTelInput.min.js, utils.js.

In case of @angular/cli, add 2 files in your angular.json.

For example,

  • Include intlTelInput.css in "styles" at your angular.json file :
  "styles": [
    ...
    "node_modules/intl-tel-input/build/css/intlTelInput.css",
    ...
  ]
  • Include intlTelInput.min.js, utils.js in "scripts" at your angular.json file :
  "scripts": [
    ...
    "node_modules/intl-tel-input/build/js/intlTelInput.min.js"
    ...
  ]

Now add Ng2TelInputModule into your AppModule. For example,

import {Ng2TelInputModule} from 'ng2-tel-input';

Once done, we are ready to use this library.

How to use?

In order to use this directive, you need to add "ng2TelInput" directive with "[ng2TelInputOptions]" options to your text field. For example,

<input type="text"
  ng2TelInput
  [ng2TelInputOptions]="{initialCountry: 'in'}"
  (hasError)="hasError($event)"
  (ng2TelOutput)="getNumber($event)"
  (intlTelInputObject)="telInputObject($event)"
  (countryChange)="onCountryChange($event)" />

Note

(intlTelInputObject) returns intl-tel-input instance. By default this package get utils.js from below link:- https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.1/js/utils.js But you can also provide your utilsScript file by using below options:-

[ng2TelInputOptions]="{initialCountry: 'in', utilsScript: 'node_modules/intl-tel-input/build/js/utils.js'}"

How to use this instance?

You can use it perform any functionality that is available on intl-tel-input plugin. For example, in your component,

telInputObject(obj) {
    console.log(obj);
    obj.setCountry('in');
  }

N|Solid

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].