angular2-input-masks
This input sanitization directive prevents the user from typing invalid characters into your inputs. It will later be extended to support masking, e.g. (xxx)xxx-xxxx for phone numbers.
Supports 2.0.0.
Usage
;; @ MaskType = MaskType; // anything matching this regex will be replaced. remember to use the negate flag (^) when whitelisting customRegex = /[^a-z0-9!%&#]/; customMask: { let result:CustomMaskResult = maskedValue: configinitialValue newCaretPosition: configcurrentCaretPosition ; return result; } // remember to import MaskingModule into your NgModule!
Under Development