[Trunk | Explore]: Use HttpInterceptorService (http-interceptor.service.ts) for not repeating in client requests of server.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@57198 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
7b5b8cfe32
commit
c4051d2e2b
|
@ -1,11 +1,9 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { SharedModule } from './shared/shared.module';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { BrowserModule, BrowserTransferStateModule } from '@angular/platform-browser';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { APP_BASE_HREF, CommonModule } from '@angular/common';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
|
||||
|
@ -21,6 +19,7 @@ import { ErrorModule} from './openaireLibrary/error/error.module';
|
|||
|
||||
import { OpenaireErrorPageComponent } from './error/errorPage.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HttpInterceptorService } from "./openaireLibrary/http-interceptor.service";
|
||||
|
||||
@NgModule({
|
||||
|
||||
|
@ -29,11 +28,12 @@ import { AppRoutingModule } from './app-routing.module';
|
|||
NoopAnimationsModule,
|
||||
CommonModule,
|
||||
HttpClientModule,
|
||||
ErrorModule,
|
||||
NavigationBarModule, FeedbackModule, BottomModule,
|
||||
ErrorModule,
|
||||
NavigationBarModule, FeedbackModule, BottomModule,
|
||||
CookieLawModule,
|
||||
BrowserModule.withServerTransition({appId: 'my-app'}),
|
||||
AppRoutingModule
|
||||
AppRoutingModule,
|
||||
BrowserTransferStateModule
|
||||
],
|
||||
declarations: [ AppComponent, OpenaireErrorPageComponent],
|
||||
exports: [ AppComponent ],
|
||||
|
@ -42,8 +42,12 @@ NavigationBarModule, FeedbackModule, BottomModule,
|
|||
provide: REQUEST_TOKEN,
|
||||
useClass: EnvironmentSpecificService
|
||||
},*/
|
||||
EnvironmentSpecificResolver
|
||||
|
||||
EnvironmentSpecificResolver,
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: HttpInterceptorService,
|
||||
multi: true
|
||||
}
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {ServerModule} from '@angular/platform-server';
|
||||
import {ServerModule, ServerTransferStateModule} from '@angular/platform-server';
|
||||
import {ModuleMapLoaderModule} from '@nguniversal/module-map-ngfactory-loader';
|
||||
|
||||
import {AppModule} from './app.module';
|
||||
|
@ -13,6 +13,7 @@ import {AppComponent} from './app.component';
|
|||
AppModule,
|
||||
ServerModule,
|
||||
ModuleMapLoaderModule,
|
||||
ServerTransferStateModule
|
||||
],
|
||||
// Since the bootstrapped component is not inherited from your
|
||||
// imported AppModule, it needs to be repeated here.
|
||||
|
|
Loading…
Reference in New Issue