I'm working on simple hybrid app and I'm using Onsen UI using purely JavaScript, and everything is working good so far. The only issue I have is determining if the mobile device is a Tablet or Phone. I found ons.platform
reference, and the isAndroidTablet()
method, but I can't figure out how to use it. I used the <ons-if orientation="landscape">
and <ons-if platform="android">
to modify a few DOM elements when in landscape orientation and/or android, and it works great, but if I could use this isAndroidTablet()
option, it would be great. I've been looking everywhere, but I can't find any documentation in addition to what's already on the Onsen UI pages. This is what I have so far:
<ons-if orientation="landscape">
<div id="overlay">
<ons-scroller style="height:300px">
<ons-list id="theList">
</ons-list>
</ons-scroller>
<ons-if platform="android">I'm Android
</ons-if>
</div>
</ons-if>
I would like to replace the <ons-if orientation="landscape">
with something like what isAndroidTablet()
I guess should do. Anyone out there has had any experience with this? Thanks!