简体   繁体   English

剑道移动后退按钮不起作用

[英]Kendo mobile back button not working

I am building a single page PhoneGap application, I am using Angular Kendo. 我正在构建一个单页PhoneGap应用程序,正在使用Angular Kendo。
For app navigation I am loading multiple html pages dynamical as per user operations. 对于应用程序导航,我正在根据用户操作动态加载多个html页面。

I have a Kendo back button on every page to navigate to previous page as below: 我在每个页面上都有一个Kendo后退按钮,可导航到上一页,如下所示:

<kendo-mobile-header >
   <kendo-mobile-nav-bar style="color:black;">
      <kendo-view-title style="color:white;">Test</kendo-view-title>
      <kendo-mobile-back-button id="back-button" style="color:white;" k-align="'left'">Back</kendo-mobile-back-button>
      <kendo-mobile-button style="color:white;" k-align="'right'" href="Test.html">Next</kendo-mobile-button>
   </kendo-mobile-nav-bar>
</kendo-mobile-header>

But I am not able to navigate to previous page when I click on back button, also I am not getting any error in console logs. 但是,当我单击“后退”按钮时,我无法导航到上一页,而且控制台日志中也没有出现任何错误。

How can I debug this issue? 如何调试此问题?

In my case i was able to solve this by prefixing the href with "/" and using kendo.mobile.application.navigate. 就我而言,我能够通过在href前面加上“ /”并使用kendo.mobile.application.navigate来解决此问题。 I was able to diagnose this by looking at the history in the browser and seeing that there were two entries when there should have been one. 通过查看浏览器中的历史记录,并发现应该有两个条目,我就能诊断出这一点。 Also note that the use of hashbang in the application affects this. 还要注意,在应用程序中使用hashbang会影响这一点。 I turned that off to make matching the correct url for history easier. 我将其关闭以使匹配用于历史记录的正确URL更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM