18 lines
827 B
TypeScript
18 lines
827 B
TypeScript
import { ApplicationConfig, provideBrowserGlobalErrorListeners, isDevMode, provideZonelessChangeDetection, provideZoneChangeDetection } from '@angular/core';
|
|
import { provideServiceWorker } from '@angular/service-worker';
|
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
|
|
export const appConfig: ApplicationConfig = {
|
|
providers: [
|
|
provideBrowserGlobalErrorListeners(),
|
|
provideZoneChangeDetection({ eventCoalescing: true }),
|
|
provideServiceWorker('custom-service-worker.js', {
|
|
enabled: !isDevMode(),
|
|
// Register the ServiceWorker as soon as the application is stable
|
|
// or after 30 seconds (whichever comes first).
|
|
registrationStrategy: 'registerWhenStable:30000'
|
|
}),
|
|
provideHttpClient(withInterceptorsFromDi()),
|
|
]
|
|
};
|