Reputation: 4341
Using Cordova I'm targeting Windows Desktop (specifically Windows 10). In my deviceready
event, I have the following code:
document.addEventListener( "backbutton", function() {
window.history.back();
}, false );
This hooks up the back arrow in the top left hand corner of the window and works a treat. 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?
Upvotes: 0
Views: 123
Reputation: 10831
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?
On any page of your application, you can call the following API to hide the back button again:
var Core = Windows.UI.Core;
Core.SystemNavigationManager.getForCurrentView().appViewBackButtonVisibility = Core.AppViewBackButtonVisibility.collapsed;
Upvotes: 2