1

I am updating to Angular 13 and I am seeing errors surrounding this import:

import(`@angular/common/locales/${lang.split('-')[0]}.js`).then(locale => {
registerLocaleData(locale.default); });

What should I be using?

1 Answer 1

3

Recently, I have migrated to Angular 13. I also faced the same issue. The changes below worked for me.

import(`@/../@angular/common/locales/${lang}.mjs`)
.then(localModule => {
          registerLocaleData(localModule.default)
     });
1
  • Do you know the page where this change is mentioned as a part of Angular 13 migration? Your answer is the only place on Internet I could find mentioning @/../@angular... obsoleting /node_modules/@angular... Commented Sep 22, 2023 at 9:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.