ng-pattern-mask
v1.0.6
Published
Angular library for inputs mask
Downloads
4
Maintainers
Readme
Status
Install
npm install ng-pattern-mask
Setup
import {NgPatternMaskModule} from 'ng-pattern-mask';
@NgModule({
imports: [
NgPatternMaskModule,
...
],
...
}) {...}
Configuration
| Parameter | Required | Description |
| ----------------------- | -------- | ----------------------------------------------------------------- |
| ngpmPattern
| Required | The pattern used by directive |
| ngpmDigitPlaceholders
| Optional | Digit placeholders used by directive - Default set = "dDmMyYhH09" |
| ngpmCharPlaceholders
| Optional | Char placeholders used by directive - Default set = "_" |
| placeholder
| Optional | Input placeholder |
Basic usage
<!-- directive -->
<input
ngPatternMask
ngpmPattern="dd.MM.yyyy"
placeholder="dd.MM.yyyy"
ngpmDigitPlaceholders="dDmMyYhH09" <!-- OPTIONAL default = dDmMyYhH09 -->
ngpmCharPlaceholders="_-" <!-- OPTIONAL default = _ -->
/>