aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.module.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/app.module.ts')
-rw-r--r--client/src/app/app.module.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts
index 9f46d49a2..8fc054d79 100644
--- a/client/src/app/app.module.ts
+++ b/client/src/app/app.module.ts
@@ -1,13 +1,13 @@
1import 'focus-visible' 1import 'focus-visible'
2import { environment } from 'src/environments/environment' 2import { environment } from 'src/environments/environment'
3import { APP_BASE_HREF, registerLocaleData } from '@angular/common' 3import { APP_BASE_HREF, registerLocaleData } from '@angular/common'
4import { NgModule } from '@angular/core' 4import { APP_INITIALIZER, NgModule } from '@angular/core'
5import { BrowserModule } from '@angular/platform-browser' 5import { BrowserModule } from '@angular/platform-browser'
6import { ServiceWorkerModule } from '@angular/service-worker' 6import { ServiceWorkerModule } from '@angular/service-worker'
7import localeOc from '@app/helpers/locales/oc' 7import localeOc from '@app/helpers/locales/oc'
8import { AppRoutingModule } from './app-routing.module' 8import { AppRoutingModule } from './app-routing.module'
9import { AppComponent } from './app.component' 9import { AppComponent } from './app.component'
10import { CoreModule } from './core' 10import { CoreModule, ServerService } from './core'
11import { EmptyComponent } from './empty.component' 11import { EmptyComponent } from './empty.component'
12import { HeaderComponent, SearchTypeaheadComponent, SuggestionComponent } from './header' 12import { HeaderComponent, SearchTypeaheadComponent, SuggestionComponent } from './header'
13import { HighlightPipe } from './header/highlight.pipe' 13import { HighlightPipe } from './header/highlight.pipe'
@@ -26,6 +26,10 @@ import { SharedUserInterfaceSettingsModule } from './shared/shared-user-settings
26 26
27registerLocaleData(localeOc, 'oc') 27registerLocaleData(localeOc, 'oc')
28 28
29export function loadConfigFactory (server: ServerService) {
30 return () => server.loadConfig()
31}
32
29@NgModule({ 33@NgModule({
30 bootstrap: [ AppComponent ], 34 bootstrap: [ AppComponent ],
31 35
@@ -67,7 +71,13 @@ registerLocaleData(localeOc, 'oc')
67 { 71 {
68 provide: APP_BASE_HREF, 72 provide: APP_BASE_HREF,
69 useValue: '/' 73 useValue: '/'
70 } 74 },
75 {
76 provide: APP_INITIALIZER,
77 useFactory: loadConfigFactory,
78 deps: [ ServerService ],
79 multi: true
80 }
71 ] 81 ]
72}) 82})
73export class AppModule {} 83export class AppModule {}