brmasker

mascara para inputs

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
brmasker
1.0.195 years ago6 years agoMinified + gzip package size for brmasker in KB

Readme

brmasker
GitHub issues GitHub stars GitHub forks GitHub license Build Status
Get brmasker angular 4

return custom mask in input for angular 2
Required
  • node 7.7.3 or up
  • npm 4.1.2 or up
  • @angular/cli: 1.0.0-beta.30
  • masker: 1.0.15
install
npm install brmasker --save

HTML

usage in input

<input type="text" name="cpf" placeholder="CPF" 
[brmasker]="{mask:'000.000.000-00', len:14}" value="">
Module
import { AppMaskerModule } from 'brmasker';

@NgModule({
  imports: [
    AppMaskerModule
  ],
})
Characters
- . / ( ) , * + @ # R$ $ & %
Guide
brmasker="{mask:'000.000.000-00', len:14}"
brmasker = component receive array (mask, len)
mask --> required / default = '' / custom mask
len --> required / default = 0 / number of length

data

[brmasker]="{mask:'00/00/0000', len:10}"

cep

[brmasker]="{mask:'00.000-000', len:10}"

cpf

[brmasker]="{mask:'000.000.000-00', len:14}"

cnpj

[brmasker]="{mask:'00.000.000/0000-00', len:18}"

telefone

[brmasker]="{mask:'(00) 0000-0000', len:14}"

whatsapp

[brmasker]="{mask:'(00) 00000-0000', len:15}"
Build for developer
remove files before build
dist/
src/app/app.module.ngfactory.ts
src/app/app.module.ngsummary.json
src/app/index.ngsummary.json
src/app/components/index.ngsummary.json
src/app/components/masker/index.ngsummary.json
src/app/components/masker/masker.component.ngfactory.ts
src/app/components/masker/masker.component.ngsummary.json
src/app/components/masker/masker.module.ngfactory.ts
src/app/components/masker/masker.module.ngsummary.json

npm run build