Sammy.js app link routing not working in phonegap

邮差的信 提交于 2019-12-23 05:22:41

问题


I am trying to get a basic sammy.js app running through phonegap.

The app loads fine but when running the app through my android (2.2) handset the routing doesn't seem to work- nothing happens when the links are clicked, but when running the app through an Android virtual device (2.1) the links work as expected and the correct templates are rendered.

Has anyone encountered this problem or similar who might be able to point me in the right direction as there is limited documentation regarding sammy.js and Phonegap?


回答1:


This is because of an issue with Android's browser. You can check the solution proposed here: https://github.com/quirkey/sammy/issues/105
Basically add this.disable_push_state = true; in your $.sammy(function () {...} and everything works fine.



来源:https://stackoverflow.com/questions/11034811/sammy-js-app-link-routing-not-working-in-phonegap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!