X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2FAppModule.ts;h=451e0f13673b8b4ba1e58440e82ddb803e7227ce;hb=refs%2Fchanges%2F57%2F11957%2F4;hp=02fa73644016093caae2972c035b68ecdf20850d;hpb=3b4814aa2d3dec621dadb52f058ba95a3dc3a86a;p=osm%2FNG-UI.git diff --git a/src/app/AppModule.ts b/src/app/AppModule.ts index 02fa736..451e0f1 100644 --- a/src/app/AppModule.ts +++ b/src/app/AppModule.ts @@ -19,7 +19,7 @@ * @file Instance Module file */ import { CommonModule, LOCATION_INITIALIZED } from '@angular/common'; -import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common/http'; +import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { APP_INITIALIZER, Injector, NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; @@ -50,6 +50,8 @@ import { NgIdleKeepaliveModule } from '@ng-idle/keepalive'; import { AuthenticationService } from 'AuthenticationService'; import { AuthGuardService } from 'AuthGuardService'; import { BreadcrumbComponent } from 'BreadCrumb'; +import { ChangePasswordComponent } from 'ChangePasswordComponent'; +import { ChangePasswordModule } from 'ChangePasswordModule'; import { ComposePackages } from 'ComposePackages'; import { ConfirmationTopologyComponent } from 'ConfirmationTopology'; import { DeleteComponent } from 'DeleteComponent'; @@ -67,7 +69,9 @@ import { PageNotFoundComponent } from 'PageNotFound'; import { PDUInstancesActionComponent } from 'PDUInstancesActionComponent'; import { ProjectLinkComponent } from 'ProjectLinkComponent'; import { ProjectsActionComponent } from 'ProjectsAction'; +import { ScalingComponent } from 'ScalingComponent'; import { SDNControllerActionComponent } from 'SDNControllerActionComponent'; +import { SharedModule } from 'SharedModule'; import { ShowInfoComponent } from 'ShowInfoComponent'; import { SwitchProjectComponent } from 'SwitchProjectComponent'; import { UsersActionComponent } from 'UsersActionComponent'; @@ -121,7 +125,9 @@ const customNotifierOptions: NotifierOptions = { PDUInstancesActionComponent, SDNControllerActionComponent, SwitchProjectComponent, - GoToTopDirective + GoToTopDirective, + ScalingComponent, + ChangePasswordComponent ], imports: [ NotifierModule.withConfig(customNotifierOptions), @@ -143,9 +149,11 @@ const customNotifierOptions: NotifierOptions = { }), NgbModule, NgSelectModule, - RouterModule.forRoot(appRoutes, { useHash: false }), + RouterModule.forRoot(appRoutes, { useHash: false, relativeLinkResolution: 'legacy' }), NgIdleKeepaliveModule.forRoot(), - LoaderModule + LoaderModule, + SharedModule, + ChangePasswordModule ], providers: [ { @@ -191,7 +199,9 @@ const customNotifierOptions: NotifierOptions = { WIMAccountsActionComponent, PDUInstancesActionComponent, SDNControllerActionComponent, - SwitchProjectComponent + SwitchProjectComponent, + ScalingComponent, + ChangePasswordComponent ] }) @@ -220,7 +230,7 @@ export function appInitializerFactory(translate: TranslateService, injector: Inj translate.setDefaultLang('en'); const languageCode: string = localStorage.getItem('languageCode'); if (languageCode !== null && languageCode !== undefined && languageCode !== '') { - await translate.use(languageCode).toPromise().catch(() => { + await translate.use(languageCode).toPromise().catch((): void => { translate.setDefaultLang('en'); }); } else {