{"id":21177430,"url":"https://github.com/betsol/ng-intl-tel-input","last_synced_at":"2025-07-09T22:30:45.262Z","repository":{"id":43329306,"uuid":"51527755","full_name":"betsol/ng-intl-tel-input","owner":"betsol","description":"intl-tel-input integration for Angular.js","archived":false,"fork":false,"pushed_at":"2020-04-29T22:48:09.000Z","size":1977,"stargazers_count":21,"open_issues_count":11,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-03T13:54:19.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/betsol.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-11T16:22:49.000Z","updated_at":"2021-09-05T17:32:45.000Z","dependencies_parsed_at":"2022-09-04T13:21:29.465Z","dependency_job_id":null,"html_url":"https://github.com/betsol/ng-intl-tel-input","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/betsol/ng-intl-tel-input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fng-intl-tel-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fng-intl-tel-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fng-intl-tel-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fng-intl-tel-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/betsol","download_url":"https://codeload.github.com/betsol/ng-intl-tel-input/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fng-intl-tel-input/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504573,"owners_count":23618825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T17:16:02.276Z","updated_at":"2025-07-09T22:30:45.024Z","avatar_url":"https://github.com/betsol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# betsol-ng-intl-tel-input\n\n[![npm version](https://badge.fury.io/js/betsol-ng-intl-tel-input.svg)](http://badge.fury.io/js/betsol-ng-intl-tel-input)\n[![Bower version](https://badge.fury.io/bo/betsol-ng-intl-tel-input.svg)](http://badge.fury.io/bo/betsol-ng-intl-tel-input)\n\n\nThis module for Angular.js (`^1.2.29`) provides integration\nfor the great [intl-tel-input][intl-tel-input] jQuery plugin (version 7-8 are supported).\n\nPlease feel free to investigate [the original plugin][intl-tel-input]\nfor mode details, [features][intl-tel-input-features] and\n[configuration][intl-tel-input-options].\n\n\u003e —» [DEMO][demo] «—\n\n\n## Installation\n\n### Install integration library with `npm` or `Bower`\n\n- `npm i --save betsol-ng-intl-tel-input`\n\n- `bower install --save betsol-ng-intl-tel-input`\n\n\n### Add integration library to your page\n\nMake sure, that module is added to your page either as a part of automatically built bundle\nor manually using the code like this:\n\n``` html\n\u003cscript src=\"../betsol-ng-intl-tel-input/dist/betsol-ng-intl-tel-input.js\"\u003e\u003c/script\u003e\n```\n\nYou should use minified version (`betsol-ng-intl-tel-input.min.js`) in production.\n\n\n### Add dependency in your application's module definition\n\n``` javascript\nvar application = angular.module('application', [\n  // ...\n  'betsol.intlTelInput'\n]);\n```\n\n### Introduce the directive\n\nTo add the plugin to any input field please use the `intl-tel-input` directive:\n\n`\u003cinput type=\"tel\" ng-model=\"user.phoneNumber\" intl-tel-input\u003e`\n\n\n### Original plugin\n\nThis module depends on [intl-tel-input][intl-tel-input] plugin to operate.\nIf you installed the module using *npm* or *Bower*, then the dependency will be installed automatically,\nand if your are using some automated build tool, it will probably be added to your bundle.\n\nIn other cases make sure to install it manually using the [following guide][intl-tel-input-install].\n\n\n## Configuration\n\n### Global\n\nYou can configure the plugin by changing the global object `intlTelInputOptions`.\nThis will apply specified changes across all plugin instances in your application.\nAll configuration options could be found in the [original plugin documentation][intl-tel-input-options].\n\n#### Global Configuration Example\n\n```javascript\nangular\n  .module('app', ['betsol.intlTelInput'])\n  .config(function (intlTelInputOptions) {\n    angular.extend(intlTelInputOptions, {\n      nationalMode: false,\n      utilsScript: '/vendor/intl-tel-input/utils.js',\n      defaultCountry: 'auto',\n      preferredCountries: ['ru', 'kz'],\n      autoFormat: true,\n      autoPlaceholder: true\n    });\n  })\n;\n```\n\n### Custom instance configuration\n\nYou can configure each input field individually by\nspecifying the configuration options via `intl-tel-input-options` attribute.\n\n#### Instance Configuration Example\n\n```html\n\u003cinput\n    type=\"tel\"\n    ng-model=\"user.phoneNumber\"\n    intl-tel-input\n    intl-tel-input-options=\"{ excludeCountries: ['us', 'de'] }\"\n\u003e\n```\n\n## API\n\nYou can use `intl-tel-input-controller` attribute to specify an object\nthat will be populated with the directive's API functions.\n\n### API Usage Example\n\n```javascript\nangular\n  .module('app', ['betsol.intlTelInput'])\n  .controller('MyCtrl', function ($scope) {\n    $scope.myIntlTelInputCtrl;\n    $scope.changeCountryToRussia = function () {\n      $scope.myIntlTelInputCtrl.setCountry('ru');\n    };\n  })\n;\n```\n\n```html\n\u003cinput\n    type=\"tel\"\n    ng-model=\"user.phoneNumber\"\n    intl-tel-input\n    intl-tel-input-controller=\"myIntlTelInputCtrl\"\n\u003e\n\u003cbutton ng-click=\"changeCountryToRussia()\"\u003e\n    Change Country to Russia\n\u003c/button\u003e\n```\n\n\n### List of Supported API Functions:\n\n- `setCountry({string} countryCode)`\n\n### Phone number validator\n\nThis directive will add `phoneNumber` validator to the underlying model controller.\nYou can use it to display validation errors.\n\n#### Validation Example\n\n```\n\u003cspan ng-show=\"formName.inputName.$error.phoneNumber\"\u003e\n    Please enter a correct phone number!\n\u003c/span\u003e\n```\n\n\n## Changelog\n\nPlease see the [changelog][changelog] for list of changes.\n\n\n## Feedback\n\nIf you have found a bug or have another issue with the library —\nplease [create an issue][new-issue].\n\nIf you have a question regarding the library or it's integration with your project —\nconsider asking a question at [StackOverflow][so-ask] and sending me a\nlink via [E-Mail][email]. I will be glad to help.\n\nHave any ideas or propositions? Feel free to contact me by [E-Mail][email].\n\nCheers!\n\n\n## FAQ\n\n@todo\n\n\n## Developer guide\n\nFork, clone, create a feature branch, implement your feature, cover it with tests, commit, create a PR.\n\nRun:\n\n- `npm i` to initialize the project\n- `npm i -g gulp` to install Gulp\n- `gulp build` to re-build the dist files\n- `gulp test` or `karma start` to test the code\n- `gulp start` to run demo server and watches\n- `gulp demo:deploy` to deploy the demo on GitHub Pages\n\nDo not add dist files to the PR itself.\nWe will re-compile the module manually each time before releasing.\n\n\n## Support\n\nIf you like this library consider to add star on [GitHub repository][repo-gh].\n\nThank you!\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Slava Fomin II, BETTER SOLUTIONS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n  [changelog]: CHANGELOG.md\n  [so-ask]:    http://stackoverflow.com/questions/ask?tags=angularjs,javascript\n  [email]:     mailto:s.fomin@betsol.ru\n  [new-issue]: https://github.com/betsol/ng-intl-tel-input/issues/new\n  [gulp]:      http://gulpjs.com/\n  [repo-gh]:   https://github.com/betsol/ng-intl-tel-input\n\n  [intl-tel-input]:          https://github.com/jackocnr/intl-tel-input\n  [intl-tel-input-features]: https://github.com/jackocnr/intl-tel-input#features\n  [intl-tel-input-options]:  https://github.com/jackocnr/intl-tel-input#options\n  [intl-tel-input-install]:  https://github.com/jackocnr/intl-tel-input#getting-started\n  [demo]:                    http://betsol.github.io/ng-intl-tel-input/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetsol%2Fng-intl-tel-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetsol%2Fng-intl-tel-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetsol%2Fng-intl-tel-input/lists"}