Different lock orientation from phone and tablet in same app


#1

Hi everyone. I’m a beginner in the Ionic’s world.

I’m doing an app for phones and tablets. The idea is have different layouts for phone and tablet, but having the same source code to generate just one app package (.ipa, .apk). I know the different layouts is possible with dynamic templates.

But I’m trying to figure out how to make an app with to different lock orientation.

  • For phones I need to be locked in portrait.
  • For tablets I need to be locked in landscape.

I know that if add the <preference name="Orientation" value="portrait" /> can lock the app, but this works for both: phones and tablets, and I need different orientations.

Is this possible? This can be do it just using a plugin? Can I do with the core functions of Ionic?

Thanks!