-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathapp.config.ts
More file actions
61 lines (53 loc) · 2.39 KB
/
app.config.ts
File metadata and controls
61 lines (53 loc) · 2.39 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
55
56
57
58
59
60
61
import { provideStore } from '@ngxs/store';
import { TranslateModule } from '@ngx-translate/core';
import { ConfirmationService, MessageService } from 'primeng/api';
import { providePrimeNG } from 'primeng/config';
import { DialogService } from 'primeng/dynamicdialog';
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { ApplicationConfig, ErrorHandler, importProvidersFrom, provideZoneChangeDetection } from '@angular/core';
import { provideAnimations } from '@angular/platform-browser/animations';
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 { EXTENSION_INITIALIZATION_PROVIDER } from '@core/provider/extension.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,
useFactory: () => Sentry.createErrorHandler({ showDialog: false }),
},
importProvidersFrom(TranslateModule.forRoot(provideTranslation())),
provideAnimations(),
providePrimeNG({
theme: {
preset: CustomPreset,
options: {
darkModeSelector: false,
cssLayer: {
name: 'primeng',
order: 'reset, base, primeng',
},
},
},
}),
provideHttpClient(withInterceptors([authInterceptor, viewOnlyInterceptor, errorInterceptor])),
provideRouter(routes, withInMemoryScrolling({ scrollPositionRestoration: 'top', anchorScrolling: 'enabled' })),
provideStore(STATES),
provideZoneChangeDetection({ eventCoalescing: true }),
SENTRY_PROVIDER,
// Dynamic Extension Loading (configured in extensions.config.ts)
EXTENSION_INITIALIZATION_PROVIDER,
],
};