Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/firebird-ng/src/app/app.config.ts is written in an unsupported language. File is not indexed.

0001 import {APP_INITIALIZER, ApplicationConfig, importProvidersFrom} from '@angular/core';
0002 import { provideRouter } from '@angular/router';
0003 import { routes } from './app.routes';
0004 import {provideAnimations} from "@angular/platform-browser/animations";
0005 import {ServerConfigService} from "./services/server-config.service";
0006 import {provideHttpClient, withFetch} from "@angular/common/http";
0007 
0008 export const appConfig: ApplicationConfig = {
0009   providers: [
0010     provideRouter(routes),
0011     provideAnimations(),
0012     provideHttpClient(withFetch()),
0013     {
0014       provide: APP_INITIALIZER,
0015       useFactory: configInitializer,
0016       deps: [ServerConfigService],
0017       multi: true
0018     }
0019   ]
0020 };
0021 
0022 export function configInitializer(configService: ServerConfigService): () => Promise<any> {
0023   return () => configService.loadConfig();
0024 }