-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathapp.config.ts
More file actions
54 lines (48 loc) · 2.02 KB
/
Copy pathapp.config.ts
File metadata and controls
54 lines (48 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { provideStore } from '@ngxs/store';
import { ConfirmationService, MessageService } from 'primeng/api';
import { providePrimeNG } from 'primeng/config';
import { DialogService } from 'primeng/dynamicdialog';
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
import { ApplicationConfig, ErrorHandler } from '@angular/core';
import { provideClientHydration, withEventReplay } from '@angular/platform-browser';
import { provideRouter, withInMemoryScrolling } from '@angular/router';
import { STATES } from '@core/constants/ngxs-states.constant';
import { provideTranslation } from '@core/helpers/i18n.helper';
import { authInterceptor } from '@core/interceptors/auth.interceptor';
import { errorInterceptor } from '@core/interceptors/error.interceptor';
import { viewOnlyInterceptor } from '@core/interceptors/view-only.interceptor';
import { APPLICATION_INITIALIZATION_PROVIDER } from '@core/provider/application.initialization.provider';
import { SENTRY_PROVIDER } from '@core/provider/sentry.provider';
import CustomPreset from './core/theme/custom-preset';
import { routes } from './app.routes';
import * as Sentry from '@sentry/angular';
export const appConfig: ApplicationConfig = {
providers: [
APPLICATION_INITIALIZATION_PROVIDER,
ConfirmationService,
DialogService,
MessageService,
{
provide: ErrorHandler,
useValue: Sentry.createErrorHandler({ showDialog: false }),
},
SENTRY_PROVIDER,
provideTranslation,
provideClientHydration(withEventReplay()),
provideRouter(routes, withInMemoryScrolling({ scrollPositionRestoration: 'top', anchorScrolling: 'enabled' })),
provideHttpClient(withInterceptors([authInterceptor, viewOnlyInterceptor, errorInterceptor]), withFetch()),
providePrimeNG({
theme: {
preset: CustomPreset,
options: {
darkModeSelector: false,
cssLayer: {
name: 'primeng',
order: 'reset, base, primeng',
},
},
},
}),
provideStore(STATES),
],
};