I am currently using Angular 17 and here are the specific Versions/Details:
Angular CLI: 17.3.8
Node: 18.20.2
Package Manager: npm 10.5.0
OS: linux x64
Angular: 17.3.12
My goal is to import the ngx-intl-tel-input
library in order to validate phone numbers with country codes.
I have explored both of the following options:
https://www.npmjs.com/package/ngx-intl-tel-input
https://www.npmjs.com/package/ngx-intl-tel-input-gg
The packages listed in my package.json file include:
"google-libphonenumber": "^3.2.38",
"intl-tel-input": "^17.0.3",
"ngx-intl-tel-input": "^3.2.0",
Changes made in the angular.json file:
"styles": [
"node_modules/ngx-toastr/toastr.css",
"node_modules/intl-tel-input/build/css/intlTelInput.css",
"src/styles.scss"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/intl-tel-input/build/js/intlTelInput.min.js",
]
Additionally, I imported the module into the app-component.
After completing these steps, I can now see a text box with a country flag where I can input a phone number. However, upon clicking on the country flag, the drop down menu fails to open.