Only vertically


#1

Hi,
I want to my app work only vertically.(all pages)
Can I do this?


#2

If you want to restrict to portrait mode only on all devices you should add this line to the config.xml in your projects root folder…

After that, please rebuild the platform by typing below text in command line:

ionic build


#3

Add this in your config.xml:

<preference name="Orientation" value="portrait" />

this will force the app to run only in portrait mode (thus tilting your phone won’t rotate your screen). It will only work on the device off course.


#4

thank you @luukschoen