导航问题 [英] Navigation problems

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

问题描述

在我的应用中,我在顶部有多个按钮,可以导航到特定页面。导航工作正常,但如果用户在页面上并单击按钮导航到该页面,则"ready:"函数中的任何代码都不会运行。以下是我导航的
示例:



功能Page1Nav(){

    WinJS.Navigation.navigate(" /pages/page1/page1.html")


}


如果我要导航到其中一个其他页面然后回到上一页'ready:'函数运行但当我再次单击该按钮时仍然有问题。希望这是有道理的。

解决方案

嗨JYount,


我可能需要问几个问题了解你的真实情况。


您是否正在使用此类导航模式?你把ready()函数放在你的代码中的哪里?在你的最后一句话中,你的意思是事件可以被其他页面触发,只有在点击按钮时才触发?


如果可能的话,你能与我们分享你的演示以获得更好的支持吗?



- 詹姆斯


In my app, I have multiple buttons at the top which navigate to a specific page. The navigation works fine, but if the user was on a page and clicked the button to navigate to that page none of the code in the 'ready:' function gets ran. Here is a sample of my navigation:

function Page1Nav() {
    WinJS.Navigation.navigate("/pages/page1/page1.html")

}

If I were to navigate to one of the other pages then come back to the previous page the 'ready:' function is ran but still has problems when I click that button again. Hope that makes sense.

解决方案

Hi JYount,

I may need ask few questions for understanding your real situation.

Are you working with this kind of navigation patten? And where you put the ready() function in your code? And in your last words, you mean the event can be fired with other pages, only not fire while button clicked?

If possible, could you share your demo with us for a better support?

--James


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

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