Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Last active July 1, 2019 18:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrilletuzi/9e374ed872e4d5639fef215d5ee2aba4 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/9e374ed872e4d5639fef215d5ee2aba4 to your computer and use it in GitHub Desktop.
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