From 3c8e2a47c184d38b3dd5e6affdee8d6c8acc8d20 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 12 Oct 2018 22:16:52 +0900 Subject: [PATCH] ing --- src/app/app.component.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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);