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