@abp/ng.core 9.2.2 → 9.2.4
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.
package/fesm2022/abp-ng.core.mjs
CHANGED
|
@@ -1013,11 +1013,12 @@ async function getInitialData() {
|
|
|
1013
1013
|
return throwError(() => error);
|
|
1014
1014
|
}));
|
|
1015
1015
|
await lastValueFrom(result$);
|
|
1016
|
+
await localeInitializer(injector);
|
|
1016
1017
|
}
|
|
1017
|
-
function localeInitializer() {
|
|
1018
|
-
const
|
|
1019
|
-
const sessionState =
|
|
1020
|
-
const { registerLocaleFn } =
|
|
1018
|
+
function localeInitializer(injector) {
|
|
1019
|
+
const currentInjector = injector || inject(Injector);
|
|
1020
|
+
const sessionState = currentInjector.get(SessionStateService);
|
|
1021
|
+
const { registerLocaleFn } = currentInjector.get(CORE_OPTIONS);
|
|
1021
1022
|
const lang = sessionState.getLanguage() || 'en';
|
|
1022
1023
|
return new Promise((resolve, reject) => {
|
|
1023
1024
|
registerLocaleFn(lang).then(module => {
|
|
@@ -4275,12 +4276,11 @@ function provideAbpCore(...features) {
|
|
|
4275
4276
|
cookieName: 'XSRF-TOKEN',
|
|
4276
4277
|
headerName: 'RequestVerificationToken',
|
|
4277
4278
|
})),
|
|
4278
|
-
provideAppInitializer(() => {
|
|
4279
|
-
getInitialData();
|
|
4280
|
-
localeInitializer();
|
|
4279
|
+
provideAppInitializer(async () => {
|
|
4281
4280
|
inject(LocalizationService);
|
|
4282
4281
|
inject(LocalStorageListenerService);
|
|
4283
4282
|
inject(RoutesHandler);
|
|
4283
|
+
await getInitialData();
|
|
4284
4284
|
}),
|
|
4285
4285
|
LocaleProvider,
|
|
4286
4286
|
CookieLanguageProvider,
|