Projekt

Obecné

Profil

Stáhnout (1.72 KB) Statistiky
| Větev: | Tag: | Revize:
1
import {BrowserModule} from '@angular/platform-browser';
2
import {NgModule} from '@angular/core';
3

    
4
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
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/http';
12
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
import {CommonModule} from '@angular/common';
17

    
18
import {BasicAuthInterceptor} from "./auth/basic-auth.interceptor";
19

    
20
@NgModule({
21
  declarations: [
22
    AppComponent,
23
    MenuComponent,
24
    HeaderComponent,
25
    PageNotFoundComponent
26
  ],
27
  imports: [
28
    BrowserModule,
29
    HttpClientModule,
30
    AppRoutingModule,
31
    TranslateModule.forRoot({
32
      loader: {
33
        provide: TranslateLoader,
34
        useFactory: HttpLoaderFactory,
35
        deps: [HttpClient]
36
      }
37
    }),
38
    DashboardModule,
39
    MatDialogModule,
40
    ProfileSettingsModule,
41
    EmployeesModule,
42
    MatMenuModule,
43
    CommonModule
44
  ],
45
  providers: [
46
    {provide: HTTP_INTERCEPTORS, useClass: BasicAuthInterceptor, multi: true}
47
  ],
48
  bootstrap: [AppComponent]
49
})
50
export class AppModule { }
51

    
52
export function HttpLoaderFactory(http: HttpClient) {
53
  return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
54
}
(5-5/5)