From 6db78785e65f2bcf31892338ff19dd3ee22c3643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Sun, 21 Nov 2021 19:11:35 +0100 Subject: [PATCH] screen orientation changed from cordova to capacitor --- src/app/app.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 447d26c0d..692c31663 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -50,9 +50,9 @@ export class AppComponent { /* this.splashScreen.hide(); */ if (this.platform.is("tablet")) { - this.screenOrientation.unlock(); + window.screen.orientation.unlock(); } else if( this.platform.is("mobile")) { - this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY); + window.screen.orientation.lock('portrait'); console.log('Orientation locked') }