From c0cecb0cf031959910202a3fe577167b4fb6e49f Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 26 Feb 2020 12:51:02 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=9B=84=20?= =?UTF-8?q?=EB=A7=88=EC=9A=B0=EC=8A=A4=20=EB=92=A4=EB=A1=9C=EA=B0=80?= =?UTF-8?q?=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C?= =?UTF-8?q?=20=EA=B0=80=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/pages/messenger/components/main.page.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts index 15a69485..0d806824 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts @@ -51,6 +51,7 @@ import { environment } from '../../../../environments/environment'; import { TranslateService } from '@ngx-translate/core'; import { LeftSideComponent } from '@app/layouts/messenger/components/left-side.component'; import { MatDrawer } from '@angular/material/sidenav'; +import { LocationStrategy } from '@angular/common'; @Component({ selector: 'app-page-messenger-main', @@ -100,11 +101,18 @@ export class MainPageComponent implements OnInit, OnDestroy { private sessionStorageService: SessionStorageService, private translateService: TranslateService, private dialogService: DialogService, + private location: LocationStrategy, private logger: NGXLogger ) { this.environmentsInfo = this.sessionStorageService.get( KEY_ENVIRONMENTS_INFO ); + + // preventing back button in browser + history.pushState(null, null, window.location.href); + this.location.onPopState(() => { + history.pushState(null, null, window.location.href); + }); } ngOnInit(): void {