Last active
July 1, 2019 18:08
-
-
Save cyrilletuzi/9e374ed872e4d5639fef215d5ee2aba4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { ServerModule } from '@angular/platform-server'; | |
import { HTTP_INTERCEPTORS } from '@angular/common/http'; | |
import { AppModule } from './app.module'; | |
import { AppComponent } from './app.component'; | |
import { UniversalInterceptor } from './universal.interceptor'; | |
@NgModule({ | |
imports: [ | |
AppModule, | |
ServerModule | |
], | |
providers: [{ | |
provide: HTTP_INTERCEPTORS, | |
useClass: UniversalInterceptor, | |
/* Multi is important or you will delete all the other interceptors */ | |
multi: true | |
}], | |
bootstrap: [AppComponent] | |
}) | |
export class AppServerModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment