[angular-18] app.module: replace provider withFetch with withInterceptorsFromDi

This commit is contained in:
Alex Martzios 2024-09-26 15:04:06 +03:00
parent c983dad44b
commit 024945ce00
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import {SharedModule} from './shared/shared.module';
import {BrowserModule} from '@angular/platform-browser'; import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import { HTTP_INTERCEPTORS, provideHttpClient, withFetch } from '@angular/common/http'; import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
import {AppComponent} from './app.component'; import {AppComponent} from './app.component';
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module'; import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module'; import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module';
@ -45,7 +45,7 @@ import {CustomRouteReuseStrategy} from './openaireLibrary/shared/custom-route-re
}, },
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }], [{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }], [{ provide: DEFAULT_TIMEOUT, useValue: 30000 }],
provideHttpClient(withFetch()) provideHttpClient(withInterceptorsFromDi())
] }) ] })
export class AppModule { export class AppModule {
} }

@ -1 +1 @@
Subproject commit cd782d4a68a67dcba4d5d1bbce7ee737ad1f3871 Subproject commit 9c93a1e306ce7abd43e3c552a2fff0240ae2f04c