JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q37297F
  • License MIT

Mascaras e pipes muito siples para ser utilizado nos projetos Angular 2+

Package Exports

  • ng2-brasil

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ng2-brasil) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ng2-mask-brasil

Projeto em desenvolvimento de mascaras e pipes para reutilização nos projetos para a formatação de strings no Angular 2+.

Implementado

Pipes: telefone

Como usar

1 - Instale o pacote: npm i --save ng2-brasil

npm i --save ng2-brasil

2 - Adicione o pacote no app.module.ts do seu projeto.

import { MaskBrasilModule } from 'ng2-brasil/dist';

@NgModule({
  declarations: [],
  imports: [
    MaskBrasilModule
  ],
  providers: [],
})

3 - Adicione o pipe nos locais onde a string deverá ser formatada. Ex.: 00987654321

{{ string | telefone }} // (00) 98765-4321 - Padrão
{{ string | telefone: 'NATIONAL' }} // (00) 98765-4321
{{ string | telefone: 'E164' }}<br> // +5500987654321
{{ string | telefone: 'INTERNATIONAL' }}<br> // (00) 98765-4321
{{ string | telefone: 'RFC3966' }} tel:+55-00-98765-4321

Por padrão a biblioteca usa o padrão brasileiro para formação para telefones.