Sammy.js app link routing not working in phonegap

2019-06-14 12:57发布

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条回答
趁早两清
2楼-- · 2019-06-14 13:07

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.

查看更多
登录 后发表回答