# Device Rotation

**URL:** <https://forum.ionicframework.com/t/device-rotation/37206>\
**Category:** ionic-v1\
**Created:** [November 17, 2015, 1:49am UTC](https://forum.ionicframework.com/t/device-rotation/37206 "2015-11-17T01:49:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jwt02180](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@jwt02180](https://forum.ionicframework.com/u/jwt02180)\
**Post date:** [November 17, 2015, 11:14pm UTC](https://forum.ionicframework.com/t/device-rotation/37206/2 "2015-11-17T23:14:10Z")

</div>

For anyone interested I found the solution for myself. I am using the most current version of cordova (5.4.0), and the documentation for that version suggests this setting in config.xml to support rotation:

`<platform name="ios"> <preference name="Orientation" value="all" /> </platform>`

I found that following the documentation for cordova (5.0.0) contained the config.xml settings that ended up working for me:

`<preference name="Orientation" value="default" />`

in addition to this global function being present:

`/\*\*

- @param {Number} degree - UIInterfaceOrientationPortrait: 0, UIInterfaceOrientationLandscapeRight: 90, UIInterfaceOrientationLandscapeLeft: -90, UIInterfaceOrientationPortraitUpsideDown: 180
- @returns {Boolean} Indicating if rotation should be allowed.  
\*/  
function shouldRotateToOrientation(degrees) {  
return true;  
}`

Just absolutely silly if you ask me, I would prefer the solution suggested in the cordova 5.4.0 documentation compared to this. But I guess whatever works!

---

_[View the full topic](https://forum.ionicframework.com/t/device-rotation/37206)._
