vp-ngx-phone-mask
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

NgxPhoneMask

Angular directive for autoformatting international phone numbers.

Usage

Install via npm:

npm install ngx-phone-mask

Import in your app.module.ts:

import { NgxPhoneMaskModule } from 'ngx-phone-mask';

@NgModule({
  imports: [
    NgxPhoneMaskModule
  ]
})

Use it:

<input ngxPhoneMask [(ngModel)]='yourModelName'>
or
<input ngxPhoneMask [formControl]='yourControl'>
or
<input ngxPhoneMask formControlName='yourControlName'>

Config

You can set valueType to 'clean', 'raw' or 'full' to change output format. Default is 'clean'.

<input ngxPhoneMask [(ngModel)]='yourModelName' valueType='full'>

Contribution

This component is under development. Pull requests and issues (PR's better) are welcome.

To publish:

git commit
npm version patch
npm run build
npm publish dist

Package Sidebar

Install

npm i vp-ngx-phone-mask

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

66 kB

Total Files

16

Last publish

Collaborators

  • almelnik_prov