blob: a8fa01241326ef7df9b3a6924f98bedb77e5e269 [file] [log] [blame]
/********************************************************************************
* Copyright © 2018 Mettenmeier GmbH.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ErrorHandler, LOCALE_ID } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CoreModule } from '@core/core.module';
import { MessageService } from 'primeng/components/common/messageservice';
import { NgbDateParserFormatter, NgbDatepickerI18n } from '@ng-bootstrap/ng-bootstrap';
import { MasterdataManagementModule } from '@masterdata/masterdata-management.module';
import { AuthInterceptor } from '@core/interceptors/auth.interceptor';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ErrorInterceptor } from '@core/interceptors/error.interceptor';
import { StandbyScheduleModule } from '@schedule/standby-schedule.module';
import { NgbDateStringParserFormatter } from '@shared/utils/dateFormatter.util';
import { ReportingModule } from '@reporting/reporting.module';
import { CustomDatepickerI18nService } from '@shared/utils/custom-datepicker-i18n.service';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
CoreModule,
MasterdataManagementModule,
StandbyScheduleModule,
HttpClientModule,
BrowserAnimationsModule,
ReportingModule
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: AuthInterceptor,
multi: true
},
{
provide: ErrorHandler,
useClass: ErrorInterceptor,
},
{
provide: NgbDateParserFormatter, useClass: NgbDateStringParserFormatter
},
{ provide: NgbDatepickerI18n, useClass: CustomDatepickerI18nService },
MessageService
],
bootstrap: [AppComponent]
})
export class AppModule { }