Lock device in portrait orientation


#1

I need to get my app to be locked in portrait orientation at all times. I’ve tried screen.lockOrientation(‘portrait’) in angular.module and .config but haven’t gotten it to work.


#2

Hi! try to read this page : http://www.gajotres.net/changing-locking-screen-orientation-in-ionic-application/


#3

I tried this but it’s not working…I copied his code by importing plugin with CLI and then tried screen.lockOrientation(‘portrait’); both in the angular.module and .config … I also tried changing preference in config.xml but still no luck