-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.ts
36 lines (32 loc) · 1.6 KB
/
app.config.ts
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
import { ApplicationConfig, LOCALE_ID, importProvidersFrom } from '@angular/core';
import { BrowserModule, Title } from '@angular/platform-browser';
import { RouterFeatures, TitleStrategy, provideRouter, withComponentInputBinding, withDebugTracing } from '@angular/router';
import { ServiceWorkerModule } from '@angular/service-worker';
import { HttpClientModule } from '@angular/common/http';
import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap';
import { DEBUG_INFO_ENABLED } from 'app/app.constants';
import './config/dayjs';
import { httpInterceptorProviders } from 'app/core/interceptor/index';
import routes from './app.routes';
// jhipster-needle-angular-add-module-import JHipster will add new module here
import { NgbDateDayjsAdapter } from './config/datepicker-adapter';
import { AppPageTitleStrategy } from './app-page-title-strategy';
const routerFeatures: Array<RouterFeatures> = [withComponentInputBinding()];
if (DEBUG_INFO_ENABLED) {
routerFeatures.push(withDebugTracing());
}
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes, ...routerFeatures),
importProvidersFrom(BrowserModule),
// Set this to true to enable service worker (PWA)
importProvidersFrom(ServiceWorkerModule.register('ngsw-worker.js', { enabled: false })),
importProvidersFrom(HttpClientModule),
Title,
{ provide: LOCALE_ID, useValue: 'en' },
{ provide: NgbDateAdapter, useClass: NgbDateDayjsAdapter },
httpInterceptorProviders,
{ provide: TitleStrategy, useClass: AppPageTitleStrategy },
// jhipster-needle-angular-add-module JHipster will add new module here
],
};