Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Last active November 10, 2022 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/49f3eb17dcc4c35bf045fdae63c7f419 to your computer and use it in GitHub Desktop.
Save NetanelBasal/49f3eb17dcc4c35bf045fdae63c7f419 to your computer and use it in GitHub Desktop.
import {
HTTP_INTERCEPTORS,
provideHttpClient,
withInterceptors,
withInterceptorsFromDi,
} from '@angular/common/http';
import { bootstrapApplication } from '@angular/platform-browser';
bootstrapApplication(AppComponent, {
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
provideHttpClient(
withInterceptorsFromDi(),
withInterceptors([
(req, next) => {
return next(req);
},
])
),
],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment