Last active
February 28, 2023 21:16
-
-
Save netstart/6fbde97d702cafb441067831edc771fb to your computer and use it in GitHub Desktop.
Forçar que o Angular utilize o locale pt-BR em uma aplicação.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/angular/angular-cli/issues/6683 | |
import { NgModule, LOCALE_ID } from '@angular/core'; | |
// force to use locale pt-BR | |
providers: [ {provide: LOCALE_ID, useValue: 'pt-BR' } ] | |
// Or use below line to get locale from browser | |
// providers: [ {provide: LOCALE_ID, useValue: window.navigator.language} ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I had to add this too:
registerLocaleData(ptBr);
. See this link:angular/angular#20197 (comment)