diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 9770549..0f19c23 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -39,11 +39,21 @@ export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, On // this.showTitleBar = !__LINUX__; this.showTitleBar = false; this.block = false; + + this.translateService.onLangChange.subscribe(() => { + this.changeDetector.detectChanges(); + }); + this.translateService.onTranslationChange.subscribe(() => { + this.changeDetector.detectChanges(); + }); + this.translateService.setDefaultLang('en'); this.translateService.use('en'); } ngOnInit(): void { + const __this = this; + this.store.dispatch(new AppStore.AppInit()); this.store.dispatch(new UserStore.SetMemberID({ memberID: 'scannerUser' })); // this.probeService.connect(); @@ -79,7 +89,7 @@ export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, On default: break; } - this.changeDetector.detectChanges(); + __this.changeDetector.detectChanges(); }), catchError(error => { return of(error);