Giter Site home page Giter Site logo

brmasker-ionic's Introduction

brmasker-ionic

GitHub issues GitHub stars GitHub forks GitHub license Build Status

return custom mask in input for ionic 2

Required

  • node 7.7.3 or up
  • npm 4.1.2 or up
  • ionic 2.2.1

install

npm install brmasker-ionic --save

HTML

correct usage

<ion-item>
	<ion-input type="text" name="cpf" placeholder="CPF" [brmasker]="{mask:'000.000.000-00', len:14}"></ion-input>
</ion-item>

usage in input

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

Module

import { AppMaskerModule } from 'brmasker-ionic';

@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

brmasker-ionic's People

Contributors

amarkes avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.