carnet-portal-app/src/app/app.config.ts

25 lines
899 B
TypeScript
Raw Normal View History

2025-06-04 23:21:18 -05:00
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
import { provideClientHydration, withEventReplay } from '@angular/platform-browser';
2025-06-22 22:21:10 -03:00
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
2025-06-04 23:21:18 -05:00
import {
provideCharts,
withDefaultRegisterables,
} from 'ng2-charts';
2025-06-22 22:21:10 -03:00
import { AuthInterceptor } from './core/interceptors/auth.interceptor';
2025-06-04 23:21:18 -05:00
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideClientHydration(withEventReplay()),
provideHttpClient(),
2025-06-22 22:21:10 -03:00
provideHttpClient(withInterceptorsFromDi()),
provideCharts(withDefaultRegisterables()),
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },]
2025-06-04 23:21:18 -05:00
};