Hi folks!

Today, we will explore the ng2-tel-input package and will see how we can use it in Angular. Also, we will look into some of the useful options it provides.

This package gives the superpower to the phone number field. We can select the country code which includes the respective country flag as well.

Now to get started, first install the ng2telinput package in your Angular project by running the following command.

npm i ng2-tel-input

Now include **intlTelInput.css **in “styles” and **intlTelInput.min.js **in “scripts” at yourangular.json file.

"styles": [
    ...
    "node_modules/intl-tel-input/build/css/intlTelInput.css",
    ...
  ]
"scripts": [
    ...
    "node_modules/intl-tel-input/build/js/intlTelInput.min.js"
    ...
  ]

#programming #front-end-development #javascript #angular

Using ng2-tel-input in Angular
4.45 GEEK