Created
October 5, 2021 17:01
-
-
Save matheusmurta/34eb28e003b953e17a937c6c9dcb6852 to your computer and use it in GitHub Desktop.
angular 2+ currency pipe programmatically
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
//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