{"id":19312015,"url":"https://github.com/weblineindia/angular-phone-number-input","last_synced_at":"2025-07-29T22:10:36.907Z","repository":{"id":57179421,"uuid":"280430837","full_name":"weblineindia/Angular-Phone-Number-Input","owner":"weblineindia","description":"An AngularJS package for entering and validating international telephone numbers. It also adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting / validation methods.","archived":false,"fork":false,"pushed_at":"2024-05-02T10:46:39.000Z","size":278,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T13:35:39.037Z","etag":null,"topics":["angular","angular-components","angular-libraries","angular-phone-input","angular-phone-number-input","angularjs","angularjs-components","angularjs-library","international-telephone","phone-input","phone-number","phone-number-input","phone-number-picker","phone-validation","reusable-components"],"latest_commit_sha":null,"homepage":"https://www.weblineindia.com/software-development-resources.html","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/weblineindia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-17T13:25:56.000Z","updated_at":"2024-05-02T10:46:43.000Z","dependencies_parsed_at":"2024-11-10T00:32:21.667Z","dependency_job_id":"942a7312-6acb-48ab-bba3-66a327032fde","html_url":"https://github.com/weblineindia/Angular-Phone-Number-Input","commit_stats":null,"previous_names":["weblineindia/angularjs-phone-number-input"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/weblineindia/Angular-Phone-Number-Input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FAngular-Phone-Number-Input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FAngular-Phone-Number-Input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FAngular-Phone-Number-Input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FAngular-Phone-Number-Input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weblineindia","download_url":"https://codeload.github.com/weblineindia/Angular-Phone-Number-Input/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FAngular-Phone-Number-Input/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267770434,"owners_count":24141843,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["angular","angular-components","angular-libraries","angular-phone-input","angular-phone-number-input","angularjs","angularjs-components","angularjs-library","international-telephone","phone-input","phone-number","phone-number-input","phone-number-picker","phone-validation","reusable-components"],"created_at":"2024-11-10T00:32:07.873Z","updated_at":"2025-07-29T22:10:36.880Z","avatar_url":"https://github.com/weblineindia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular - Phone Number Component\r\n\r\nA Angular based Phone Number component used to specify an input field where the user can enter data.\r\n\r\n## Table of contents\r\n\r\n- [Browser Support](#browser-support)\r\n- [Demo](#demo)\r\n- [Getting started](#getting-started)\r\n- [Usage](#usage)\r\n- [Available Props](#available-props)\r\n- [Methods](#methods)\r\n- [Want to Contribute?](#want-to-contribute)\r\n- [Collection of Components](#collection-of-components)\r\n- [Changelog](#changelog)\r\n- [License](#license)\r\n- [Keywords](#Keywords)\r\n\r\n## Browser Support\r\n\r\n| ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |\r\n| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\r\n| 83.0 ✔                                                                                   | 77.0 ✔                                                                                      | 13.1.1 ✔                                                                                 | 83.0 ✔                                                                             | 11.9 ✔                                                                                                                       |\r\n\r\n## Demo\r\n\r\n[![](phone-numbers.gif)](https://github.com/weblineindia/AngularJS-Phone-Number/phone-numbers.gif)\r\n\r\n## Getting started\r\n\r\nInstall the npm package:\r\n\r\n```bash\r\nnpm install angular-weblineindia-phone-number\r\n#OR\r\nyarn add angular-weblineindia-phone-number\r\n```\r\n\r\n## Usage\r\n\r\nUse the `\u003cangular-weblineindia-phone-number\u003e` component:\r\n\r\nAdd in app.module.ts file\r\n\r\n```\r\nimport { AppComponent } from './app.component';\r\nimport { AngularWeblineindiaPhoneNumberModule } from 'angular-weblineindia-phone-number';\r\n\r\n@NgModule({\r\n  imports: [\r\n    AngularWeblineindiaPhoneNumberModule,\r\n  ],\r\n})\r\nexport class AppModule {}\r\n\r\n```\r\n\r\nAdd in app.component.ts file\r\n\r\n```typescript\r\nexport class AppComponent {\r\n  constructor() {}\r\n  // based on event you can manage isInvalidPhoneNumber and invalidMessage\r\n  isInvalidPhoneNumber: boolean = false;\r\n  invalidMessage: string = \"\";\r\n\r\n  onCountrySelected(event: any): void {\r\n    console.log(\"onCountrySelected: \", event);\r\n  }\r\n\r\n  onFocusHandler(event: any): void {\r\n    console.log(\"onFocusHandler: \", event.target.value);\r\n  }\r\n  onBlurHandler(event: any): void {\r\n    console.log(\"onBlurHandler: \", event.target.value);\r\n  }\r\n  onChangeHandler(event: any): void {\r\n    console.log(\"onChangeHandler: \", event.target.value);\r\n  }\r\n  onKeyPressHandler(event: any): void {\r\n    console.log(\"onKeyPressHandler: \", event.target.value);\r\n  }\r\n  onKeyDownHandler(event: any): void {\r\n    console.log(\"onKeyDownHandler: \", event.target.value);\r\n  }\r\n  onKeyUpHandler(event: any): void {\r\n    console.log(\"onKeyUpHandler: \", event.target.value);\r\n  }\r\n}\r\n```\r\n\r\nAdd in app.component.css file\r\n\r\n```\r\n::ng-deep .phoneNumberInput {\r\n  display: flex;\r\n}\r\n\r\n::ng-deep .countrySelectBox {\r\n  margin-right: 5px;\r\n}\r\n\r\n::ng-deep .inputBox {\r\n  margin-left: 5px;\r\n}\r\n\r\n::ng-deep .errorMessage {\r\n  color: RED;\r\n  margin: 0;\r\n}\r\n\r\n::ng-deep .mainDiv {\r\n  display: flex;\r\n}\r\n```\r\n\r\nAdd in app.component.html file\r\n\r\n```html\r\n\u003cangular-weblineindia-phone-number name=\"'text'\" value=\"'initalValue'\" phoneNumberInput=\"phoneNumberInput\" countrySelectBox=\"countrySelectBox\" inputBox=\"inputBox\" errorMessage=\"errorMessage\" placeholder=\"'Add placeholder'\" [countryCode]=\"'+1784'\" [disabled]=\"false\" [require]=\"true\" [isInvalidPhoneNumber]=\"isInvalidPhoneNumber\" [invalidMessage]=\"invalidMessage\" (focus)=\"onFocusHandler($event)\" (blur)=\"onBlurHandler($event)\" (keyPress)=\"onKeyPressHandler($event)\" (keyDown)=\"onKeyDownHandler($event)\" (keyUp)=\"onKeyUpHandler($event)\" (countrySelected)=\"onCountrySelected($event)\"\u003e\u003c/angular-weblineindia-phone-number\u003e\r\n```\r\n\r\n## Available Props\r\n\r\n| Prop                 | Type    | default | Description                                     |\r\n| -------------------- | ------- | ------- | ----------------------------------------------- |\r\n| name                 | String  |         | Name for the input                              |\r\n| value                | String  |         | value for the input                             |\r\n| phoneNumberInput     | String  |         | CSS class applied for phone number input.       |\r\n| countrySelectBox     | String  |         | CSS class applied for selection input.          |\r\n| inputBox             | String  |         | CSS class applied for input.                    |\r\n| errorMessage         | String  |         | CSS class applied for error message.            |\r\n| placeholder          | String  |         | The input field will get this placeholder text  |\r\n| countryCode          | String  | +91     | Country code which user provided by default     |\r\n| disabled             | boolean | false   | If true, disables the input field.              |\r\n| require              | boolean |         | If true, makes the input field mandatory.       |\r\n| isInvalidPhoneNumber | boolean | false   | Indicates if the password is invalid            |\r\n| invalidMessage       | String  |         | Message to display when the password is invalid |\r\n\r\n## Methods\r\n\r\n| Name            | Description                                                      |\r\n| --------------- | ---------------------------------------------------------------- |\r\n| focus           | Gets triggered when the autocomplete input field receives focus. |\r\n| blur            | Gets triggered when the autocomplete input field loses focus.    |\r\n| KeyPress        | Gets triggered when a key gets pressed.                          |\r\n| KeyDown         | Gets triggered when a key gets down.                             |\r\n| KeyUp           | Gets triggered when a key gets up.                               |\r\n| countrySelected | Gets trigged when change the country code from dropdown.         |\r\n\r\n## Want to Contribute?\r\n\r\n- Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).\r\n- [Fork it](http://help.github.com/forking/).\r\n- Create new branch to contribute your changes.\r\n- Commit all your changes to your branch.\r\n- Submit a [pull request](http://help.github.com/pull-requests/).\r\n\r\n---\r\n\r\n## Collection of Components\r\n\r\nWe have built many other components and free resources for software development in various programming languages. Kindly click here to view our [Free Resources for Software Development](https://www.weblineindia.com/software-development-resources.html)\r\n\r\n---\r\n\r\n## Changelog\r\n\r\nDetailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).\r\n\r\n## License\r\n\r\n[MIT](LICENSE)\r\n\r\n[mit]: https://github.com/weblineindia/AngularJS-Phone-Number/blob/master/LICENSE\r\n\r\n## Keywords\r\n\r\nangular-weblineindia-phone-number, phonenumber, input, angular, angular-component, phonenumber-component, phone-number-input\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweblineindia%2Fangular-phone-number-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweblineindia%2Fangular-phone-number-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweblineindia%2Fangular-phone-number-input/lists"}