3.3.0 • Published 5 years ago
ngx-phone-mask v3.3.0
NgxPhoneMask
Angular directive for autoformatting phone numbers. Compatible with Angular 7.
Currently doesn't support phone numbers with lengths other than 11. (+7 (987) 123-45-67
)
Usage
This libs rely on text-mask, so you need to install it.
Install via npm:
npm install ngx-phone-mask angular2-text-mask
or yarn:
yarn add ngx-phone-mask angular2-text-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 clean
to false
if you want formatted value in model.
<input ngxPhoneMask [(ngModel)]='yourModelName' valueType='full'>
Contribution
This component is under development. Pull requests and issues (PR's better) are welcome.
Contributing
Please feel free to leave your PRs, issues, feature requests.
Upcoming features
- Support other phone lengths
- Return country when recognized
- Tests
3.3.0
5 years ago
3.2.2
5 years ago
3.2.1
5 years ago
3.2.0
5 years ago
3.1.1
5 years ago
3.0.0
5 years ago
2.1.3
7 years ago
2.1.2
7 years ago
2.1.1
7 years ago
2.1.0
7 years ago
2.0.5
7 years ago
2.0.4
7 years ago
2.0.3
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.1.0
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago