From 72cb451f5a4be02ad651e2c0bf4973dd8f36f9b1 Mon Sep 17 00:00:00 2001 From: Drew Ansbacher Date: Mon, 7 Mar 2022 14:57:44 -0700 Subject: [PATCH] fix back button --- .../apps-routes/app-properties/app-properties.page.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-properties/app-properties.page.ts b/frontend/projects/ui/src/app/pages/apps-routes/app-properties/app-properties.page.ts index 1f228730d..949393d32 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-properties/app-properties.page.ts +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-properties/app-properties.page.ts @@ -5,6 +5,7 @@ import { Subscription } from 'rxjs' import { copyToClipboard } from 'src/app/util/web.util' import { AlertController, + IonBackButtonDelegate, IonContent, ModalController, NavController, @@ -31,6 +32,8 @@ export class AppPropertiesPage { unmasked: { [key: string]: boolean } = {} running = true + @ViewChild(IonBackButtonDelegate, { static: false }) + backButton: IonBackButtonDelegate @ViewChild(IonContent) content: IonContent subs: Subscription[] = [] @@ -45,6 +48,12 @@ export class AppPropertiesPage { private readonly patch: PatchDbService, ) {} + ionViewDidEnter() { + this.backButton.onClick = () => { + history.back() + } + } + async ngOnInit() { this.pkgId = this.route.snapshot.paramMap.get('pkgId')