1
|
import {NgModule} from '@angular/core';
|
2
|
import {FormsModule} from '@angular/forms';
|
3
|
import {CommonModule} from '@angular/common';
|
4
|
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
|
5
|
import {BrowserModule, BrowserTransferStateModule} from '@angular/platform-browser';
|
6
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
7
|
import {AppComponent} from './app.component';
|
8
|
import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
9
|
|
10
|
import {AppRoutingModule} from './app-routing.module';
|
11
|
import {SharedModule} from './shared/shared.module';
|
12
|
import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module';
|
13
|
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
|
14
|
import {ErrorModule} from './openaireLibrary/error/error.module';
|
15
|
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
|
16
|
|
17
|
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
18
|
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
|
19
|
import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service";
|
20
|
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
|
21
|
|
22
|
@NgModule({
|
23
|
|
24
|
imports: [
|
25
|
SharedModule,
|
26
|
BrowserAnimationsModule,
|
27
|
CommonModule,
|
28
|
HttpClientModule,
|
29
|
ErrorModule,
|
30
|
FormsModule,
|
31
|
NavigationBarModule,
|
32
|
BottomModule,
|
33
|
CookieLawModule,
|
34
|
BrowserTransferStateModule,
|
35
|
BrowserModule.withServerTransition({appId: 'my-app'}),
|
36
|
AppRoutingModule
|
37
|
],
|
38
|
declarations: [ AppComponent, OpenaireErrorPageComponent],
|
39
|
exports: [ AppComponent ],
|
40
|
providers:[EnvironmentSpecificResolver,
|
41
|
{
|
42
|
provide: HTTP_INTERCEPTORS,
|
43
|
useClass: HttpInterceptorService,
|
44
|
multi: true
|
45
|
},
|
46
|
{
|
47
|
provide: HTTP_INTERCEPTORS,
|
48
|
useClass: ErrorInterceptorService,
|
49
|
multi: true
|
50
|
},
|
51
|
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
|
52
|
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }]
|
53
|
],
|
54
|
bootstrap: [AppComponent]
|
55
|
})
|
56
|
//
|
57
|
export class AppModule {}
|