I am trying to create a directive for formatting and validating the phone numbers in my angualr 4 application, was looking for some guidance to getting started.
标签:
libphonenumber
相关问题
- Is there any sample for @angular-libphonenumber wi
- How to use Google libphonenumber in Typescript?
- libphonenumber ios get country code for country
- ng2-validation combined US/Canada Phone Validation
- libphonenumber javascript - validating
相关文章
- Is there any sample for @angular-libphonenumber wi
- 谷歌libphonenumber得到唯一的联系人手机号码(google libphonenumber
- How to use Google libphonenumber in Typescript?
- libphonenumber ios get country code for country
- ng2-validation combined US/Canada Phone Validation
- libphonenumber javascript - validating
- iOS Convert phone number to international format
- Using PhoneNumberFormattingTextWatcher without typ
Edited (15.03.2018) - thanks @Joseph Webber
First, you have to install libphonenumber-js, which is a wrapper of google-libphonenumber ready to be imported on Angular 2+. You can install it on your app with:
or
depending on the package manager you use.
After install you can use it on your component like:
I added the working demo on Github:
libphonenumber-demo-angular2