import { NgModule , CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' ; import { RouterModule } from '@angular/router' ; import { JhiLanguageService } from 'ng-jhipster' ; import { JhiLanguageHelper } from 'app/core' ; import { FrontendSharedModule } from 'app/shared' ; import { adminState , AuditsComponent , UserMgmtComponent , UserMgmtDetailComponent , UserMgmtUpdateComponent , UserMgmtDeleteDialogComponent , LogsComponent , JhiMetricsMonitoringComponent , JhiHealthModalComponent , JhiHealthCheckComponent , JhiConfigurationComponent , JhiDocsComponent } from './' ; @ NgModule ( { imports : [ FrontendSharedModule , RouterModule . forChild ( adminState ) ] , declarations : [ AuditsComponent , UserMgmtComponent , UserMgmtDetailComponent , UserMgmtUpdateComponent , UserMgmtDeleteDialogComponent , LogsComponent , JhiConfigurationComponent , JhiHealthCheckComponent , JhiHealthModalComponent , JhiDocsComponent , JhiMetricsMonitoringComponent ] , providers : [ { provide : JhiLanguageService , useClass : JhiLanguageService } ] , entryComponents : [ UserMgmtDeleteDialogComponent , JhiHealthModalComponent ] , schemas : [ CUSTOM_ELEMENTS_SCHEMA ] } ) export class FrontendAdminModule { constructor ( private languageService , private languageHelper ) { this . languageHelper . language . subscribe ( ( languageKey ) => { if ( languageKey !== undefined ) { this . languageService . changeLanguage ( languageKey ) ; } } ) ; } }