import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core'; import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; import { AuditControllerService } from './api/auditController.service'; import { DictionaryControllerService } from './api/dictionaryController.service'; import { DigitalSignatureControllerService } from './api/digitalSignatureController.service'; import { DossierAttributesControllerService } from './api/dossierAttributesController.service'; import { DossierControllerService } from './api/dossierController.service'; import { DossierTemplateControllerService } from './api/dossierTemplateController.service'; import { DownloadControllerService } from './api/downloadController.service'; import { FileAttributesControllerService } from './api/fileAttributesController.service'; import { FileManagementControllerService } from './api/fileManagementController.service'; import { GeneralSettingsControllerService } from './api/generalSettingsController.service'; import { InfoControllerService } from './api/infoController.service'; import { LegalBasisMappingControllerService } from './api/legalBasisMappingController.service'; import { LicenseReportControllerService } from './api/licenseReportController.service'; import { ManualRedactionControllerService } from './api/manualRedactionController.service'; import { ReanalysisControllerService } from './api/reanalysisController.service'; import { RedactionLogControllerService } from './api/redactionLogController.service'; import { ReportTemplateControllerService } from './api/reportTemplateController.service'; import { RulesControllerService } from './api/rulesController.service'; import { SmtpConfigurationControllerService } from './api/smtpConfigurationController.service'; import { StatusControllerService } from './api/statusController.service'; import { UploadControllerService } from './api/uploadController.service'; import { UserControllerService } from './api/userController.service'; import { UserPreferenceControllerService } from './api/userPreferenceController.service'; import { VersionsControllerService } from './api/versionsController.service'; import { ViewedPagesControllerService } from './api/viewedPagesController.service'; import { WatermarkControllerService } from './api/watermarkController.service'; @NgModule({ imports: [], declarations: [], exports: [], providers: [ AuditControllerService, DictionaryControllerService, DigitalSignatureControllerService, DossierAttributesControllerService, DossierControllerService, DossierTemplateControllerService, DownloadControllerService, FileAttributesControllerService, FileManagementControllerService, GeneralSettingsControllerService, InfoControllerService, LegalBasisMappingControllerService, LicenseReportControllerService, ManualRedactionControllerService, ReanalysisControllerService, RedactionLogControllerService, ReportTemplateControllerService, RulesControllerService, SmtpConfigurationControllerService, StatusControllerService, UploadControllerService, UserControllerService, UserPreferenceControllerService, VersionsControllerService, ViewedPagesControllerService, WatermarkControllerService ] }) export class ApiModule { constructor(@Optional() @SkipSelf() parentModule: ApiModule, @Optional() http: HttpClient) { if (parentModule) { throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); } if (!http) { throw new Error( 'You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575' ); } } public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { return { ngModule: ApiModule, providers: [{ provide: Configuration, useFactory: configurationFactory }] }; } }