screen orientation changed from cordova to capacitor

This commit is contained in:
Eudes Inácio
2021-11-21 19:11:35 +01:00
parent aca0d9cfed
commit 6db78785e6
+2 -2
View File
@@ -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')
}