Angular-br-filters

v0.7.0

An Angular library of masks applicable to several Brazilian data like I.E., CNPJ, CPF and others

View the Project on GitHub the-darc/angular-br-filters

How to Install.

You can install it using bower:

$ bower install --save angular-br-filters

Or you can install it using NPM:

$ npm install --save angular-br-filters

How to use it

Percentage: {{'0.1' | percentage}}

'0.1' | percentage

CEP: {{'30480530' | brCep}}

'30480530' | brCep

IE: {{'18100100000049' | brIe:'PE'}}

'18100100000049' | brIe:'PE'

CNPJ: {{'10157471000161' | brCnpj}}

'10157471000161' | brCnpj

CPF: {{'97070868669' | brCpf}}

'97070868669' | brCpf

Phone: {{'3133340167' | brPhoneNumber}}

'3133340167' | brPhoneNumber

Finance: {{-125.15 | finance:true:3}}

-125.15 | finance:true:3
  • Parameters: finance:[currency (default false)]:[precision (default 2)]
  • Pass a String in the currency parameter to use as the currency symbol
  • Require bower-angular-i18n to work with default browser currency symbol

NF-e access key: {{'35140111724258000157550010006882191630386000' | nfeAccessKey}}

'35140111724258000157550010006882191630386000' | nfeAccessKey

Age: {{'2010/01/05' | age}} years

/* Use with a date string: */
'2010/01/05' | age
/* Or with a date object: */
new Date('2010/01/05') | age