-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathapp.config.ts
More file actions
46 lines (40 loc) · 1.69 KB
/
Copy pathapp.config.ts
File metadata and controls
46 lines (40 loc) · 1.69 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
import { withNgxsReduxDevtoolsPlugin } from '@ngxs/devtools-plugin';
import { provideStore } from '@ngxs/store';
import { TranslateModule } from '@ngx-translate/core';
import { ConfirmationService, MessageService } from 'primeng/api';
import { providePrimeNG } from 'primeng/config';
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { ApplicationConfig, ErrorHandler, importProvidersFrom, provideZoneChangeDetection } from '@angular/core';
import { provideAnimations } from '@angular/platform-browser/animations';
import { provideRouter } from '@angular/router';
import { STATES } from '@core/constants';
import { provideTranslation } from '@core/helpers';
import { GlobalErrorHandler } from './core/handlers';
import { authInterceptor, errorInterceptor, viewOnlyInterceptor } from './core/interceptors';
import CustomPreset from './core/theme/custom-preset';
import { routes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideStore(STATES, withNgxsReduxDevtoolsPlugin({ disabled: false })),
providePrimeNG({
theme: {
preset: CustomPreset,
options: {
darkModeSelector: false,
cssLayer: {
name: 'primeng',
order: 'reset, base, primeng',
},
},
},
}),
provideAnimations(),
provideHttpClient(withInterceptors([authInterceptor, viewOnlyInterceptor, errorInterceptor])),
importProvidersFrom(TranslateModule.forRoot(provideTranslation())),
ConfirmationService,
MessageService,
{ provide: ErrorHandler, useClass: GlobalErrorHandler },
],
};