Lock orientation of some html pages in ionic


#1

Hi,

I have a mobile app build on ionic. The client wants to lock certain screens in portrait mode only while others can support both landscape & portrait. Is there any way we can achieve this?

Thanks in advance!


#2

Look at https://github.com/cogitor/PhoneGap-OrientationLock

Plugin seems to do exactly what you need.

Good luck


#3

If you want to do this in specific views you will need an appropriate plugin (@meiding provided you with one) and something that didn’t exist in the time this question was asked (view events).

Solution can be found here: