Files
marketplaces/src/app/app.config.ts

28 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-01-18 18:57:06 +04:00
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection, isDevMode } from '@angular/core';
2026-02-19 01:23:25 +04:00
import { provideRouter, withInMemoryScrolling } from '@angular/router';
2026-01-18 18:57:06 +04:00
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { routes } from './app.routes';
import { cacheInterceptor } from './interceptors/cache.interceptor';
2026-02-28 17:42:36 +04:00
import { apiHeadersInterceptor } from './interceptors/api-headers.interceptor';
2026-03-01 02:43:14 +04:00
import { mockDataInterceptor } from './interceptors/mock-data.interceptor';
2026-01-18 18:57:06 +04:00
import { provideServiceWorker } from '@angular/service-worker';
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(
2026-02-19 01:23:25 +04:00
routes,
2026-01-18 18:57:06 +04:00
withInMemoryScrolling({ scrollPositionRestoration: 'top' })
),
provideHttpClient(
2026-03-01 02:43:14 +04:00
withInterceptors([mockDataInterceptor, apiHeadersInterceptor, cacheInterceptor])
2026-02-26 21:54:21 +04:00
),
provideServiceWorker('ngsw-worker.js', {
enabled: !isDevMode(),
registrationStrategy: 'registerWhenStable:30000'
})
2026-01-18 18:57:06 +04:00
]
2026-02-26 21:54:21 +04:00
};