在横向模式下以离子方式打开应用程序

时间:2014-11-17 16:35:36

标签: cordova ionic-framework

我使用离子框架编写了一个应用程序。但它以纵向模式打开。我希望它以landscape模式打开。在phonegap中,我们有一个全局config.xml文件供我们使用 <preference name="orientation" value="landscape" />。离子有没有类似的方法?

3 个答案:

答案 0 :(得分:4)

添加

<preference name="orientation" value="portrait" /> 
config.xml中的

对我有用

答案 1 :(得分:1)

在您的Android清单文件中,将此android:screenOrientation="portrait"更改为 android:screenOrientation="landscape"。这对我来说很好用

答案 2 :(得分:0)

不,你不能强迫离子。您必须使用config.xml文件。