Browse Source

Refactor app initializer to use async function

Simplifies the app initializer by making it an async function directly instead of returning an async IIFE. This improves readability and maintains the same initialization behavior.
pull/23408/head
Fahri Gedik 10 months ago
parent
commit
4e462b577d
  1. 7
      npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts

7
npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts

@ -106,14 +106,11 @@ export function provideAbpCore(...features: CoreFeature<CoreFeatureKind>[]) {
headerName: 'RequestVerificationToken',
}),
),
provideAppInitializer(() => {
provideAppInitializer(async () => {
inject(LocalizationService);
inject(LocalStorageListenerService);
inject(RoutesHandler);
return (async (): Promise<void> => {
await getInitialData();
})();
await getInitialData();
}),
LocaleProvider,
CookieLanguageProvider,

Loading…
Cancel
Save