I have a requirement to format contact no string according to country in angular 6.
For ex. for "en"(US) convert "+18882759481" into "+1 888-275-9481".
It can be done by using plugin https://github.com/jackocnr/intl-tel-input in javascript. It has utilsScript js which allows you to format with intlTelInputUtils.formatNumber
function.
I have tried to implement this js through angular-cli But it doesn't provide intlTelInputUtils or it's functions.
Can anyone give me any idea about how it can be done. Is there any other plugin/js through i can achieve this?
Comments
Post a Comment