我已经实现了一个带有监听器的代理,但有一个异常(exception):
listeners: {
exception: function () {
Ext.Msg.alert(BB.Text.getText('ERROR_TIMEOUT_TITLE'), BB.Text.getText('ERROR_TIMEOUT_MSG') + '' + PROXY_TIMEOUT, Ext.emptyFn);
Ext.redirectTo('http://www.google.es'); //for example
}
}
收到消息后,我想重定向到其他页面/ View ,但它无法正常工作
我做错了什么?
谢谢。
最佳答案
Sencha Touch
您可能想阅读文档:
文档
http://docs.sencha.com/touch/2.4/apidocs/#!/api/Ext.app.Application-method-redirectTo
报价
Redirects the browser to the given url. This only affects the url after the '#'.
仔细阅读第二部分。 顺便说一句,这与相同:
MyApp.app.redirectTo('http://www.google.es')
它从您的帖子中获取您想要重定向到网络应用内的不同页面的信息。 可以找到 here
WebApp: window.location.href = "http://www.google.es"
关于javascript - 超时后重定向到其他 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26804395/