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)
     });
Sign up to request clarification or add additional context in comments.

1 Comment

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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.