Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -3,14 +3,15 @@ import { provideRouter } from '@angular/router';
|
||||
|
||||
import { routes } from './app.routes';
|
||||
import { provideClientHydration, withEventReplay } from '@angular/platform-browser';
|
||||
import { provideHttpClient, withFetch, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { httpInterceptorProviders } from './interceptors';
|
||||
import { loadingInterceptor } from './interceptors/loading-interceptor';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideBrowserGlobalErrorListeners(),
|
||||
provideZonelessChangeDetection(),
|
||||
provideHttpClient(withInterceptorsFromDi(), withFetch()),
|
||||
provideHttpClient(withInterceptorsFromDi(), withInterceptors([loadingInterceptor]), withFetch()),
|
||||
httpInterceptorProviders,
|
||||
provideRouter(routes), provideClientHydration(withEventReplay())
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user