Angular IMask Plugin
angular-imask
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
Install
npm install angular-imask
Setup
import { IMaskModule } from 'angular-imask';
@NgModule({
imports: [
IMaskModule,
...
],
...
}) {...}
Usage
<input
[imask]="{mask: '+{7}(000)000-00-00'}" <!--see more mask props in a guide-->
[unmask]="true"
(accept)="onAccept"
(complete)="onComplete"
[imaskElement]="(elementRef, directiveRef) => maskElement"
/>
<p>{{ value | imask:mask }}</p>
More options see in a guide.
Development
As to make changes to this package follow the steps:
- Build imask
npm run make
- Go to angular-imask directory
cd packages/angular-imask
- Launch dev command
npm run dev
- (Optional) Launch example app
npm run example