@abp/ng.core 9.3.0-rc.4 → 9.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1014,11 +1014,12 @@ async function getInitialData() {
1014
1014
  return throwError(() => error);
1015
1015
  }));
1016
1016
  await lastValueFrom(result$);
1017
+ await localeInitializer(injector);
1017
1018
  }
1018
- function localeInitializer() {
1019
- const injector = inject(Injector);
1020
- const sessionState = injector.get(SessionStateService);
1021
- const { registerLocaleFn } = injector.get(CORE_OPTIONS);
1019
+ function localeInitializer(injector) {
1020
+ const currentInjector = injector || inject(Injector);
1021
+ const sessionState = currentInjector.get(SessionStateService);
1022
+ const { registerLocaleFn } = currentInjector.get(CORE_OPTIONS);
1022
1023
  const lang = sessionState.getLanguage() || 'en';
1023
1024
  return new Promise((resolve, reject) => {
1024
1025
  registerLocaleFn(lang).then(module => {
@@ -4021,12 +4022,11 @@ function provideAbpCore(...features) {
4021
4022
  cookieName: 'XSRF-TOKEN',
4022
4023
  headerName: 'RequestVerificationToken',
4023
4024
  })),
4024
- provideAppInitializer(() => {
4025
- getInitialData();
4026
- localeInitializer();
4025
+ provideAppInitializer(async () => {
4027
4026
  inject(LocalizationService);
4028
4027
  inject(LocalStorageListenerService);
4029
4028
  inject(RoutesHandler);
4029
+ await getInitialData();
4030
4030
  }),
4031
4031
  LocaleProvider,
4032
4032
  CookieLanguageProvider,