我的 webapp 正在使用 angularjs-1.5.11,我们使用下面的行返回应用程序:
$window.history.go(-1)
这在 ios 10.2.1 中不起作用 我尝试了以下方法,但没有奏效
window.history.go(-1)
history.back()
navigator.app.backHistory
我看到其他建议禁用 hashListening 的帖子,但我不确定如何在 angularjs 中执行此操作。
请任何人有建议。
我的 webapp 正在使用 angularjs-1.5.11,我们使用下面的行返回应用程序:
$window.history.go(-1)
这在 ios 10.2.1 中不起作用 我尝试了以下方法,但没有奏效
window.history.go(-1)
history.back()
navigator.app.backHistory
我看到其他建议禁用 hashListening 的帖子,但我不确定如何在 angularjs 中执行此操作。
请任何人有建议。
尝试使用jquery
$(document).bind('mobileinit', function () {
$.mobile.hashListeningEnabled = false;
$.mobile.linkBindingEnabled = false;
});
并确保您的文件按此顺序
<script src="jquery.js"></script>
<script src="custom-scripting.js"></script> <!-- Note your script before jqm -->
<script src="jquery-mobile.js"></script>
使用下面的代码
<button type="button" onclick="goBack()">Go To Back</button>