Reputation: 249
I'd like to develop a mobile application that behave different in landscape and portrait mode.
In portrait (and or on small devices, like iPhone) I want to use the ons-sliding-menu component. In landscape in big screens (eg: iPad in landscape) I would like to have the ons-split-view.
Is it possible to do that? How can I handle the two resolutions? Thank you.
Upvotes: 0
Views: 257
Reputation: 1979
ons-split-view open/close function is deprecated and will be deleted from 1.2 version, try to use ons-if-orientation to switch between ons-split-view and ons-sliding-menu, that should be work, another option is to use ng-if.
Upvotes: 0
Reputation: 1088
ons-split-view does exactly like that and it works on all devices, only depends on orientation as:
In portrait, it'll act as ons-sliding-menu, where you slide to show the menu.
In landscape, it'll be a split view
Upvotes: 1