@universium/ngx-phone
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Masked Phone Input for Angular

and more...

This library implements phone-input directive which converts a simple input into a powerful phone input with autoformat. It also brings country emoji support to visualize phone input's country, and the phone pipe which formats phone numbers for displaying.

Sample usage:

<span [countryFlagEmojiFor]="phone"></span>
<select #select [value]="phone.countryIsoCode|async" (change)="phone.setCountry(select.value)">
    <option [value]="''">Unknown</option>
    <option *ngFor="let c of phone.countries" [value]="c.isoCode">
        {{c.emoji}} {{c.name}}
    </option>
</select>
<input phone-input #phone="phoneInput" [formControl]="control" />
<div>{{control.value | phone}}</div>

Readme

Keywords

none

Package Sidebar

Install

npm i @universium/ngx-phone

Weekly Downloads

1

Version

0.0.1

License

none

Unpacked Size

267 kB

Total Files

28

Last publish

Collaborators

  • vladrudych