Skip to content

Instantly share code, notes, and snippets.

@matheusmurta
Created October 5, 2021 17:01
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 matheusmurta/34eb28e003b953e17a937c6c9dcb6852 to your computer and use it in GitHub Desktop.
Save matheusmurta/34eb28e003b953e17a937c6c9dcb6852 to your computer and use it in GitHub Desktop.
angular 2+ currency pipe programmatically
//angular 2+ currency pipe programmatically
getFormattedPrice(price: number) {
return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(price);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment