Screen Orientation


Cordova plugin to set/lock the screen orientation in a common way.

Requires Cordova plugin: cordova-plugin-screen-orientation. For more info, please see the Screen Orientation plugin docs.

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!


ionic cordova plugin add cordova-plugin-screen-orientation npm install @ionic-native/screen-orientation
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/screen-orientation

Supported Platforms

  • Android
  • iOS
  • Windows


import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';

constructor(private screenOrientation: ScreenOrientation) { }


// get current
console.log(this.screenOrientation.type); // logs the current orientation, example: 'landscape'

// set to landscape

// allow user rotate

// detect orientation changes
   () => {
       console.log("Orientation Changed");