| /******************************************************************************** |
| * Copyright (c) 2015-2020 Contributors to the Eclipse Foundation |
| * |
| * See the NOTICE file(s) distributed with this work for additional |
| * information regarding copyright ownership. |
| * |
| * 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 { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
| import { NgModule, ErrorHandler } from '@angular/core'; |
| import { FormsModule } from '@angular/forms'; |
| import { HttpModule } from '@angular/http'; |
| import { HttpClient } from '@angular/common/http'; |
| |
| import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core'; |
| import { TranslateHttpLoader } from '@ngx-translate/http-loader'; |
| |
| import { DialogModule, DropdownModule } from 'primeng/primeng'; |
| |
| import { MDMCoreModule} from './core/mdm-core.module'; |
| import { MDMErrorHandler } from './core/mdm-error-handler'; |
| import { HttpErrorHandler } from './core/http-error-handler'; |
| import { MDMNotificationService } from './core/mdm-notification.service'; |
| |
| import { AppComponent } from './app.component'; |
| import { AppRoutingModule } from './app-routing.module'; |
| |
| import { NoticeComponent } from './notice.component'; |
| import { NodeService } from './navigator/node.service'; |
| import { NodeproviderService } from './navigator/nodeprovider.service'; |
| import { NavigatorService } from './navigator/navigator.service'; |
| import { BasketService } from './basket/basket.service'; |
| import { LocalizationService } from './localization/localization.service'; |
| import { FilereleaseService } from './filerelease/filerelease.service'; |
| import { QueryService } from './tableview/query.service'; |
| import { ViewService } from './tableview/tableview.service'; |
| import { environment } from '../environments/environment'; |
| |
| // AoT requires an exported function for factories |
| export function HttpLoaderFactory(http: HttpClient) { |
| return new TranslateHttpLoader(http, 'assets/i18n/', '.json'); |
| } |
| |
| @NgModule({ |
| imports: [ |
| BrowserModule, |
| BrowserAnimationsModule, |
| HttpModule, |
| FormsModule, |
| MDMCoreModule, |
| DialogModule, |
| AppRoutingModule, |
| DropdownModule, |
| TranslateModule.forRoot({ |
| loader: { |
| provide: TranslateLoader, |
| useFactory: HttpLoaderFactory, |
| deps: [HttpClient] |
| } |
| }), |
| ], |
| declarations: [ |
| AppComponent, |
| NoticeComponent |
| ], |
| providers: [ |
| NodeService, |
| LocalizationService, |
| FilereleaseService, |
| BasketService, |
| NavigatorService, |
| QueryService, |
| NodeproviderService, |
| MDMNotificationService, |
| ViewService, |
| HttpErrorHandler, |
| TranslateService, |
| { provide: ErrorHandler, useClass: MDMErrorHandler } |
| ], |
| bootstrap: [AppComponent] |
| }) |
| export class AppModule { |
| |
| } |