https://github.com/marcoscostadev/brmasker-ionic
mascara input para ionic
https://github.com/marcoscostadev/brmasker-ionic
Last synced: 12 months ago
JSON representation
mascara input para ionic
- Host: GitHub
- URL: https://github.com/marcoscostadev/brmasker-ionic
- Owner: MarcosCostaDev
- License: mit
- Created: 2017-06-13T14:03:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-11T13:54:44.000Z (about 9 years ago)
- Last Synced: 2025-01-17T07:32:37.306Z (over 1 year ago)
- Language: TypeScript
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# brmasker-ionic
[](https://github.com/amarkes/brmasker-ionic/issues)
[](https://github.com/amarkes/brmasker-ionic/stargazers)
[](https://github.com/amarkes/brmasker-ionic/network)
[](https://raw.githubusercontent.com/amarkes/brmasker-ionic/master/LICENSE)
[](https://travis-ci.org/amarkes/brmasker-ionic)
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
```sh
npm install brmasker-ionic --save
```
### HTML
### correct usage
```html
```
### usage in input
```html
```
# Module
```javascript
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
```html
[brmasker]="{mask:'00/00/0000', len:10}"
```
### cep
```html
[brmasker]="{mask:'00.000-000', len:10}"
```
### cpf
```html
[brmasker]="{mask:'000.000.000-00', len:14}"
```
### cnpj
```html
[brmasker]="{mask:'00.000.000/0000-00', len:18}"
```
### telefone
```html
[brmasker]="{mask:'(00) 0000-0000', len:14}"
```
### whatsapp
```html
[brmasker]="{mask:'(00) 00000-0000', len:15}"
```
# Build for developer
remove files before build
```file
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
```
```sh
npm run build
```