Project

General

Profile

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
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
17
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
18
import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service";
19
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
20

    
21
@NgModule({
22
  
23
  imports: [
24
    SharedModule,
25
    BrowserAnimationsModule,
26
    CommonModule,
27
    HttpClientModule,
28
    ErrorModule,
29
    FormsModule,
30
    NavigationBarModule,
31
    BottomModule,
32
    CookieLawModule,
33
    BrowserTransferStateModule,
34
    BrowserModule.withServerTransition({ appId: 'monitor' }),
35
    AppRoutingModule,
36
    Schema2jsonldModule
37
  ],
38
  declarations: [AppComponent, OpenaireErrorPageComponent],
39
  exports: [AppComponent],
40
  providers: [
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 {
58
}
(3-3/4)