Projekt

Obecné

Profil

Stáhnout (1.56 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 {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
@NgModule({
19
  declarations: [
20
    AppComponent,
21
    MenuComponent,
22
    HeaderComponent,
23
    PageNotFoundComponent
24
  ],
25
  imports: [
26
    BrowserModule,
27
    HttpClientModule,
28
    AppRoutingModule,
29
    TranslateModule.forRoot({
30
      loader: {
31
        provide: TranslateLoader,
32
        useFactory: HttpLoaderFactory,
33
        deps: [HttpClient]
34
      }
35
    }),
36
    DashboardModule,
37
    MatDialogModule,
38
    ProfileSettingsModule,
39
    EmployeesModule,
40
    MatMenuModule,
41
    CommonModule
42
  ],
43
  providers: [],
44
  bootstrap: [AppComponent]
45
})
46
export class AppModule { }
47

    
48
export function HttpLoaderFactory(http: HttpClient) {
49
  return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
50
}
(5-5/5)