Created
October 25, 2022 09:32
-
-
Save NetanelBasal/0523b3114c7d6fb67361b9eba661642c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { | |
provideHttpClient, | |
withInterceptors | |
} from '@angular/common/http'; | |
import { bootstrapApplication } from '@angular/platform-browser'; | |
bootstrapApplication(AppComponent, { | |
providers: [ | |
provideHttpClient( | |
withInterceptors([ | |
(req, next) => { | |
// We can use the inject() function inside this function | |
// For example: inject(AuthService) | |
return next(req); | |
}, | |
]) | |
), | |
], | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment