Sencha Touch 中的页面导航? [英] Page Navigation in Sencha Touch?

查看:60
本文介绍了Sencha Touch 中的页面导航?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Sencha Touch 的新手,想知道页面导航是如何工作的.到目前为止,我发现的最好的是:

I am new to Sencha Touch, and wonder how page navigation works. so far, the best i found was something like:

    var redirect = 'page2.html'; 
    window.location = redirect;

为了防止不必要的获取,使用 app.manifest 缓存所有 .js 和样式.

and to prevent unnecessary fetching, cache all .js and style using app.manifest.

有什么推荐的吗?有没有类似于移动版 JQuery 中的页面导航的方式?

Any recommendation? Is there a way similar to page navigation in JQuery mobile?

推荐答案

据我所知,Sencha Touch 不支持 jQuery mobile 那样的页面导航.

As far as I'm aware, Sencha Touch does not support page navigation the way jQuery mobile does.

如果您真的必须重定向(并刷新页面),那么我相信唯一的方法就是您所描述的方式 (window.location).

If you really have to redirect (and make a page refresh), then I believe the only way of doing it is the way you have described (window.location).

但是,在 Sencha Touch 中,通常不需要进行重定向.您可以轻松创建一个全屏面板,然后动态更改此面板的内容(即导航到一个页面).看一看其中一个例子,了解一下:http://dev.sencha.com/deploy/touch/examples/oreilly/

However, in Sencha Touch, there is often no need to do redirects. You could easy create a fullscreen Panel, and then change the content of this panel dynamically (i.e. navigate to a page). Have a look at one of the examples, to get the idea: http://dev.sencha.com/deploy/touch/examples/oreilly/

这篇关于Sencha Touch 中的页面导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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