Angular 5 Breaking change - manually import locale

后端 未结 3 776
误落风尘
误落风尘 2020-12-08 04:29

Changelog says:

By default Angular now only contains locale data for the language en-US, if you set the value of LOCALE_ID to another locale, you wi

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 05:12

    For

    { provide: LOCALE_ID, useValue: 'pt-BR' }
    

    Use:

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

提交回复
热议问题