Lock orientation of some html pages in ionic



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!


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

Plugin seems to do exactly what you need.

Good luck


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: