Skip to content

Instantly share code, notes, and snippets.

@cironunes
Created August 9, 2017 21:19
Show Gist options
  • Save cironunes/a05b90062196c6f486c8b67d3bad4a21 to your computer and use it in GitHub Desktop.
Save cironunes/a05b90062196c6f486c8b67d3bad4a21 to your computer and use it in GitHub Desktop.
How to register an Interceptor into an Angular 4.3.0+ application
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
@NgModule({
imports: [],
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
]
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment