Sammy.js应用程序链接路由不工作在phonegap [英] Sammy.js app link routing not working in phonegap

查看:256
本文介绍了Sammy.js应用程序链接路由不工作在phonegap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想尝试通过phonegap运行一个基本的sammy.js应用程序。

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

应用程序加载正常,但当通过我的Android(2.2)手机运行应用程序时,路由似乎不工作,当链接被点击时,通过Android虚拟设备运行应用程序(2.1)链接工作正常,并呈现正确的模板。

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.

任何人遇到此问题或类似的人由于有关sammy.js和Phonegap的有限文档,所以指向正确的方向?

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?

推荐答案

Android的浏览器。您可以检查此处提出的解决方案: https://github.com/quirkey/sammy/issues/105 < br>
基本上在 $。sammy(function(){...} this.disable_push_state = true; c $ c>,一切正常。

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.

这篇关于Sammy.js应用程序链接路由不工作在phonegap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆