2018-02-07 10:56:30 +01:00
|
|
|
import { DatasetWizardListingComponent } from './wizard/listing/dataset-wizard-listing.component';
|
|
|
|
import { DataManagementPlanWizardEditorComponent } from './wizard/editor/dmp-wizard-editor.component';
|
|
|
|
import { DataManagementPlanWizardComponent } from './wizard/dmp-wizard.component';
|
2018-01-30 10:35:26 +01:00
|
|
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
|
|
import { BaseHttpService } from '../utilities/cite-http-service-module/base-http.service';
|
|
|
|
import { InvitationAcceptedComponent } from '../invitation-accepted/invitation-accepted.component';
|
|
|
|
import { InvitationComponent } from '../invitation/invitation.component';
|
|
|
|
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
|
|
import { DataManagementPlanEditorComponent } from './editor/dmp-editor.component';
|
|
|
|
import { DataManagementPlanListingComponent } from './listing/dmp-listing.component';
|
|
|
|
import { DataManagementPlanRoutes } from './dmps.routes';
|
|
|
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
|
|
|
|
|
|
|
|
import { SharedModule } from '../shared/shared.module'
|
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
CommonModule,
|
|
|
|
FormsModule,
|
|
|
|
HttpClientModule,
|
|
|
|
SharedModule,
|
|
|
|
ReactiveFormsModule,
|
|
|
|
DataManagementPlanRoutes,
|
|
|
|
TranslateModule.forRoot({
|
|
|
|
loader: {
|
|
|
|
provide: TranslateLoader,
|
|
|
|
useFactory: HttpLoaderFactory,
|
|
|
|
deps: [HttpClient]
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
|
|
|
|
declarations: [
|
|
|
|
DataManagementPlanListingComponent,
|
|
|
|
DataManagementPlanEditorComponent,
|
|
|
|
InvitationComponent,
|
|
|
|
InvitationAcceptedComponent,
|
2018-02-07 10:56:30 +01:00
|
|
|
DataManagementPlanWizardComponent,
|
|
|
|
DataManagementPlanWizardEditorComponent,
|
|
|
|
DatasetWizardListingComponent
|
2018-01-30 10:35:26 +01:00
|
|
|
],
|
|
|
|
|
|
|
|
exports: [
|
|
|
|
DataManagementPlanListingComponent,
|
|
|
|
DataManagementPlanEditorComponent,
|
|
|
|
InvitationComponent,
|
|
|
|
InvitationAcceptedComponent,
|
2018-02-07 10:56:30 +01:00
|
|
|
DataManagementPlanWizardComponent,
|
|
|
|
DataManagementPlanWizardEditorComponent,
|
|
|
|
DatasetWizardListingComponent
|
2018-01-30 10:35:26 +01:00
|
|
|
],
|
|
|
|
entryComponents: [
|
|
|
|
InvitationComponent
|
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
BaseHttpService
|
|
|
|
]
|
|
|
|
})
|
|
|
|
|
|
|
|
export class DataManagementPlanModule {
|
|
|
|
constructor(private translate: TranslateService) {
|
|
|
|
translate.setDefaultLang('en');
|
|
|
|
translate.use('en');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export function HttpLoaderFactory(httpClient: HttpClient) {
|
|
|
|
return new TranslateHttpLoader(httpClient, 'assets/lang/', '.json');
|
|
|
|
}
|