-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Emerson Brito edited this page Mar 15, 2019
·
5 revisions
Start by importing the InputMaskModule
:
import { InputMaskModule } from '@emerbrito/input-mask';
Then apply the directive to an input element and set the mask property:
<input inputMask mask="999-99-9999">
Name | Description |
---|---|
mask: string | The mask to be used. If not specified the directive is disabled. |
value: string | Optional. Value passed to the directive. |
validateMask: boolean | Optional. Defaults to true . Whether or not mask validation should propagate to FormControl - usefull when using Angular forms. |
rules: RuleBase[] | Custom rules registered with the directive. See section Custom Rules form more details. |
Name | Description |
---|---|
format: EventEmitter<MaskEvent> | Emits when the value value changes. Contains the formatted and unformatted values. |