New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng2-tel-input

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-tel-input

An Angular 2 wrapper for intl-tel-input library

  • 1.0.15
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
decreased by-74.92%
Maintainers
1
Weekly downloads
 
Created
Source

Angular 2 wrapper for intl-tel-input

Installation

Run following command to install ng2-tel-input

npm install ng2-tel-input --save

After install, you need to add intlTelInput.css.

In case of angular-cli, add intlTelInput.css in your styles.scss. For example, @import 'intl-tel-input/build/css/intlTelInput.css';

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 original element which hold intl-tel-input instance.

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.intlTelInput('setCountry', 'in');
  }

N|Solid

Keywords

FAQs

Package last updated on 24 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc