0.2.3 • Published 7 years ago

soft-angular-mask v0.2.3

Weekly downloads
40
License
MIT
Repository
github
Last release
7 years ago

mask to input Angular 2+

Description

Directive to masquerade input in angular 2/4 (money and number).

Demo

DEMO

Example mask

(087) 8745-9876 - 76888-098 - R$ 1.234,00 - $ 1.00

Installation

To install this library, run:

$ npm install soft-angular-mask --save

and then from your Angular AppModule:

...

// Import library
import { MaskModule } from 'soft-angular-mask';

@NgModule({
  ...
  imports: [

    MaskModule

  ],
  ...
})
export class AppModule { }

Use in your Angular application:

<!-- in html -->

<input mask-number [mask]="'99999-999'" name="valCode" [(ngModel)]="valCode">

<input mask-number [mask]="'(99) 999999999'" [reqMin]="13" name="valPhone" [(ngModel)]="valPhone">
   
<input mask-money [prefix]="'R$'" name="valMoney" [(ngModel)]="valMoney">

Options - mask-number

[mask]="'9'"  <!-- '9' - represents a number -->
[reqMin]="1"  <!-- minimum size to mask -->
[maskkOutput]="true"  <!-- output ngModel masked -->

Options - mask-money

[prefix]="'R$'"  <!-- printed before value -->

Solicitation of improvements

SouUmLucas (10/11/2017) - enable output of ngModel masked / status: implemented

License

MIT © Renato Souza de Oliveira email: renatosistemas.vc@gmail.com

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago