在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):gauravsoni119/ng2-tel-input开源软件地址(OpenSource Url):https://github.com/gauravsoni119/ng2-tel-input开源编程语言(OpenSource Language):JavaScript 65.5%开源软件介绍(OpenSource Introduction):This repository is no longer maintained.Angular 2+ wrapper for intl-tel-inputInstallationRun 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 For example,
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,
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论