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
|
import {LoginComponent} from "./login/login.component";
|
20
|
|
21
|
@NgModule({
|
22
|
declarations: [
|
23
|
AppComponent,
|
24
|
MenuComponent,
|
25
|
HeaderComponent,
|
26
|
PageNotFoundComponent,
|
27
|
LoginComponent
|
28
|
],
|
29
|
imports: [
|
30
|
BrowserModule,
|
31
|
HttpClientModule,
|
32
|
AppRoutingModule,
|
33
|
TranslateModule.forRoot({
|
34
|
loader: {
|
35
|
provide: TranslateLoader,
|
36
|
useFactory: HttpLoaderFactory,
|
37
|
deps: [HttpClient]
|
38
|
}
|
39
|
}),
|
40
|
DashboardModule,
|
41
|
MatDialogModule,
|
42
|
ProfileSettingsModule,
|
43
|
EmployeesModule,
|
44
|
MatMenuModule,
|
45
|
CommonModule
|
46
|
],
|
47
|
providers: [
|
48
|
{provide: HTTP_INTERCEPTORS, useClass: BasicAuthInterceptor, multi: true}
|
49
|
],
|
50
|
bootstrap: [AppComponent]
|
51
|
})
|
52
|
export class AppModule { }
|
53
|
|
54
|
export function HttpLoaderFactory(http: HttpClient) {
|
55
|
return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
|
56
|
}
|