Projekt

Obecné

Profil

Stáhnout (1.72 KB) Statistiky
| Větev: | Tag: | Revize:
1 230804d9 Václav Jirák
import {BrowserModule} from '@angular/platform-browser';
2
import {NgModule} from '@angular/core';
3 37412123 Václav Jirák
4 230804d9 Václav Jirák
import {AppRoutingModule} from './app-routing.module';
5
import {AppComponent} from './app.component';
6
import {MenuComponent} from './menu/menu.component';
7
import {DashboardModule} from './dashboard/dashboard.module';
8
import {HeaderComponent} from './header/header.component';
9
import {MatDialogModule, MatMenuModule} from '@angular/material';
10
import {ProfileSettingsModule} from './profile-settings/profile-settings.module';
11 476b7738 Jakub Danek
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/http';
12 230804d9 Václav Jirák
import {EmployeesModule} from './employees/employees.module';
13
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
14
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
15
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
16 78eacb99 Václav Jirák
import {CommonModule} from '@angular/common';
17 37412123 Václav Jirák
18 476b7738 Jakub Danek
import {BasicAuthInterceptor} from "./auth/basic-auth.interceptor";
19
20 37412123 Václav Jirák
@NgModule({
21
  declarations: [
22 0d1b0550 Václav Jirák
    AppComponent,
23
    MenuComponent,
24 4bd9d9f6 Hung Hoang
    HeaderComponent,
25
    PageNotFoundComponent
26 37412123 Václav Jirák
  ],
27
  imports: [
28
    BrowserModule,
29 41741550 Hung Hoang
    HttpClientModule,
30 37412123 Václav Jirák
    AppRoutingModule,
31 18dbad83 Václav Jirák
    TranslateModule.forRoot({
32
      loader: {
33
        provide: TranslateLoader,
34
        useFactory: HttpLoaderFactory,
35
        deps: [HttpClient]
36
      }
37
    }),
38 37333849 Václav Jirák
    DashboardModule,
39
    MatDialogModule,
40 7c56b223 Hung Hoang
    ProfileSettingsModule,
41 230804d9 Václav Jirák
    EmployeesModule,
42 78eacb99 Václav Jirák
    MatMenuModule,
43
    CommonModule
44 37412123 Václav Jirák
  ],
45 476b7738 Jakub Danek
  providers: [
46
    {provide: HTTP_INTERCEPTORS, useClass: BasicAuthInterceptor, multi: true}
47
  ],
48 37412123 Václav Jirák
  bootstrap: [AppComponent]
49
})
50
export class AppModule { }
51 18dbad83 Václav Jirák
52
export function HttpLoaderFactory(http: HttpClient) {
53
  return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
54
}