Spaces:
Paused
Paused
| import { ApplicationConfig, ErrorHandler } from '@angular/core'; | |
| import { provideRouter } from '@angular/router'; | |
| import { routes } from './app.routes'; | |
| import { provideAnimations } from '@angular/platform-browser/animations'; | |
| import { provideHttpClient, withInterceptors, HTTP_INTERCEPTORS } from '@angular/common/http'; | |
| import { authInterceptor } from './interceptors/auth.interceptor'; | |
| import { GlobalErrorHandler, ErrorInterceptor } from './services/error-handler.service'; | |
| export const appConfig: ApplicationConfig = { | |
| providers: [ | |
| provideRouter(routes), | |
| provideAnimations(), | |
| provideHttpClient(withInterceptors([authInterceptor])), | |
| { provide: ErrorHandler, useClass: GlobalErrorHandler }, | |
| { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true } | |
| ] | |
| }; |