I'm building an mobile app with Meteor. Now if the phone changes orientation, the page no longer renders correctly. So I need to refresh the page after orientation change.
Is there a way to detect the orientation change in Meteor cordova app?
Thanks.
A good point to start is this post that actually covers both Android and iOS platforms:
Detect rotation of Android phone in the browser with JavaScript
We currently have two handlers added with
window.addEventListener
inTemplate.template_name.created
.resize
event is used on Android andorientationchange
event is used on iOS.