64 lines
2.1 KiB
TypeScript
64 lines
2.1 KiB
TypeScript
|
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,
|
||
|
],
|
||
|
|
||
|
exports: [
|
||
|
DataManagementPlanListingComponent,
|
||
|
DataManagementPlanEditorComponent,
|
||
|
InvitationComponent,
|
||
|
InvitationAcceptedComponent,
|
||
|
|
||
|
],
|
||
|
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');
|
||
|
}
|