Hide back button navigation


Hi all,

Working on a ng2 app where I need to hide back button navigation. basically, after login I don’t want user to go back.

I tried this from two perspectives: First, avoiding navigation back by adding { clearHistory: true } to routerextensions call this.routerExtensions.navigate(["/"], { clearHistory: true }); and second, hiding the UI button. I tried this with:

let controller = frameModule.topmost().ios.controller;
let navigationItem = controller.visibleViewController.navigationItem;
navigationItem.setHidesBackButtonAnimated(true, false);

None of above seems to work, I still can see back button and navigate back to previous screen.
Has anyones else gone through this from an ng2, lazy load moduled app?

Thanks so much!

Disable device's navigation buttons throughout the app [Ios/Android]

I’m doing that in my app using this.nav.navigate(["/main"], { clearHistory: true }); where main is is the path to my logged in component, and no Back button appears.

What does your router look like?


Also, depending on how you have this setup, you might want to try using a router-outlet instead of a page-router-outlet.


Hi Jon,

Thanks for your answers. Unfortunately { clearHistory: true } seems to do nothing on my app. Totally omitted, I’ve created a demo app of the issue. You can find it here:

Also, using router-outlet is not an option at all since I need the navbar there because got another action button (right side) which I need.

I’ve seen there is an PR which might get the fix for this but not sure if that PR will fix this issue especifically.




Just would like to mention here that 2.5.0 version fixed this issue. Passing { clearHistory: true } on navigate makes the job ok now.



you could also do page.actionBar.navigationButton.visibility = 'collapse'

import {Page} from "ui/page";

export class AppComponent {
    constructor(page: Page) {
        page.actionBarHidden = true;


This will hide entire actionBar, not only navigationButon


try this one:

<NavigationButton visibility="collapsed" ...



Hi guys, any update on this???