38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
|
|
import { provideRouter, withPreloading, PreloadAllModules } from '@angular/router';
|
|
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
|
|
import { routes } from './app.routes';
|
|
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
import { providePrimeNG } from 'primeng/config';
|
|
import Aura from '@primeng/themes/aura';
|
|
import { MessageService } from 'primeng/api';
|
|
import { authInterceptor } from './interceptors/auth.interceptor';
|
|
import { environment } from '../environments/environment';
|
|
|
|
export const appConfig: ApplicationConfig = {
|
|
providers: [
|
|
provideZoneChangeDetection({ eventCoalescing: true }),
|
|
provideRouter(
|
|
routes,
|
|
withPreloading(PreloadAllModules)
|
|
),
|
|
provideAnimations(),
|
|
|
|
// Usamos nuestro interceptor personalizado para DirectAuthService
|
|
provideHttpClient(
|
|
withFetch(),
|
|
withInterceptors([authInterceptor])
|
|
),
|
|
|
|
providePrimeNG({
|
|
theme: {
|
|
preset: Aura,
|
|
options: {
|
|
darkModeSelector: false || 'none'
|
|
}
|
|
}
|
|
}),
|
|
|
|
MessageService
|
|
]
|
|
}; |