Skip to content

Instantly share code, notes, and snippets.

@ASOEstudio
Last active September 19, 2020 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ASOEstudio/7817a69a1418a6a671470a3966e8b13f to your computer and use it in GitHub Desktop.
Save ASOEstudio/7817a69a1418a6a671470a3966e8b13f to your computer and use it in GitHub Desktop.
Angular Locale pt-Br, pipeDate, pipeCurrency
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, LOCALE_ID } from '@angular/core';
import { registerLocaleData } from '@angular/common';
import ptBr from '@angular/common/locales/pt';
registerLocaleData(ptBr);
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AppRoutingModule,
],
providers: [
{ provide: LOCALE_ID, useValue: 'pt' },
],
bootstrap: [AppComponent]
})
export class AppModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment