Angular IMask Plugin
angular-imask
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.
Support Development
Paypal
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