📜  角货币管道 pt-br 作为变量 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:18.195000             🧑  作者: Mango

代码示例1
//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'