![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ng2-tel-input
Advanced tools
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,
angular.json
file : "styles": [
...
"node_modules/intl-tel-input/build/css/intlTelInput.css",
...
]
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.
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)" />
(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'}"
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');
}
[2.3.0] - 2020-3-08
FAQs
An Angular 2 wrapper for intl-tel-input library
The npm package ng2-tel-input receives a total of 0 weekly downloads. As such, ng2-tel-input popularity was classified as not popular.
We found that ng2-tel-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.