angular-simple-input-mask icon indicating copy to clipboard operation
angular-simple-input-mask copied to clipboard

Way simple Angular directive to apply mask to input fields

Simple input mask directive for AngularJS


Way simple Angular directive to apply mask to input fields also with dynamic/multiple masks to the same field, which means that you can have different masks for different lengths of numbers

DEMO

Mask format uses 0 Example: 0000-0000-0000-0000

Directive will look for attribute angular-mask on input

Example:

<input name="test" maxlengh="19" angular-mask="0000-0000-0000-0000" />

Multiple masks

<input name="test" maxlengh="19" angular-mask="(00)00000-0000|(00)0000-0000" />

Use | to separate masks

Install via bower

bower install angular-input-mask --save