mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fa80975832
`globalThis` is now available on every runtime supported by Angular PR Close #50063
10 lines
615 B
JavaScript
10 lines
615 B
JavaScript
import "rxjs";
|
|
|
|
import "rxjs/operators";
|
|
|
|
const _global = globalThis;
|
|
|
|
if ("undefined" !== typeof ngDevMode && ngDevMode) _global.$localize = _global.$localize || function() {
|
|
throw new Error("It looks like your application or one of its dependencies is using i18n.\n" + "Angular 9 introduced a global `$localize()` function that needs to be loaded.\n" + "Please run `ng add @angular/localize` from the Angular CLI.\n" + "(For non-CLI projects, add `import '@angular/localize/init';` to your `polyfills.ts` file.\n" + "For server-side rendering applications add the import to your `main.server.ts` file.)");
|
|
};
|