mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
3ba99e286a
Ordinarily, providing `HttpClient` (either via `provideHttpClient` or the `HttpClientModule`) creates an entirely separate HTTP context. Requests made via that client are not passed through the interceptor chains that are configured in a parent injector, for this example. This commit introduces a new option for `provideHttpClient` called `withRequestsMadeViaParent()`. When this option is passed, requests made in the child context flow through any injectors, etc. and are then handed off to the parent context. This addresses a longstanding issue with interceptors where it's not possible to extend the set of interceptors in a child context without repeating all of the interceptors from the parent. PR Close #47502