javascript - Cordova UWP 桌面 - 隐藏后退箭头

标签 javascript angularjs cordova visual-studio-cordova

使用 Cordova 我的目标是 Windows 桌面(特别是 Windows 10)。在我的 deviceready 事件中,我有以下代码:

document.addEventListener( "backbutton", function() {
  window.history.back();
}, false );

这会连接窗口左上角的后退箭头,并且会起到很好的作用。但是,我想隐藏第一个屏幕的箭头。有没有办法根据我当前所在的页面有条件地隐藏后退箭头?

最佳答案

However, I would like to hide the arrow for the first screen. Is there a way to conditionally hide the back arrow based on the page I'm currently on?

在应用程序的任何页面上,您可以调用以下 API 再次隐藏后退按钮:

var Core = Windows.UI.Core;
Core.SystemNavigationManager.getForCurrentView().appViewBackButtonVisibility = Core.AppViewBackButtonVisibility.collapsed;

关于javascript - Cordova UWP 桌面 - 隐藏后退箭头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44424259/

相关文章:

node.js - "npm install -g cordova"导致 Windows 7 蓝屏崩溃

android - ionic / Cordova : Upload image from phone's gallery

javascript - 在 JavaScript 中的 for 循环内创建新的数组文字是否会占用大量资源?

javascript - 类型错误 : Cannot read properties of null (reading 'useState' ) in Next. js

angularjs - AngularJS 应用程序上的 CrazyEgg 跟踪

javascript - Protractor 停止工作。你能明白为什么吗?

javascript - ngCamera 不适用于 iOS

javascript - 脚本标记中何时需要 CDATA 部分?

javascript - 尽管使用范围变量,FB Javascript API 不返回电子邮件

javascript - Angular 示例代码不起作用