ons-if-orientation

This component is available with angular1 bindings only.

Conditionally display content depending on screen orientation. Valid values are portrait and landscape. Different from other components, this component is used as attribute in any element.

Usage


<div ons-if-orientation="portrait">
  <p>This will only be visible in portrait mode.</p>
</div>

See also

Attributes

Name Type Description
ons-if-orientation String Either “portrait” or “landscape”. Optional. Works only during initialization.

Need Help?

If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.

For bug reports and feature requests use our GitHub Issues page.