Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

angular currency pipe pt-br as variable

//I solved this way:

//app.module.ts

import { LOCALE_ID } from '@angular/core';
import localePt from '@angular/common/locales/pt';
import {registerLocaleData} from '@angular/common';
registerLocaleData(localePt)

 providers: [{
    provide: LOCALE_ID, 
    useValue: "pt-BR"
  }],

//.html

currency:'BRL' 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #angular #currency #pipe #variable
ADD COMMENT
Topic
Name
1+9 =