Doing an cordova app with angularjs as the frontend framework. I want a particular view in a phonegap/cordova app to appear in landscape mode. The various options I've explored so far are:
- Setting the config.xml. But you'd want this only if you intend the whole app to either be in portrait or landscape
- Adding manifest.json. (Also taking care that I do not have any orientation settings defined in my config.xml). My plan was to conditionally include the file when I want to set my orientation as landscape.
So for the 2nd option I've written code in my pages such as:
<link rel="manifest" href="manifest.json" ng-if="orientation == 'landscape'">
...and in the controller toggling the value of orientation
- with the intent of forcing it on demand.
However the above approach doesn't work.
Any idea on how to make this work?