Page Navigation in Sencha Touch?

2019-06-05 05:37发布

问题:

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;

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

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

回答1:

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

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).

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/