[SOLVED] Disable back in Ionic2


Anyone knows how to remove a view from the back history?

In Ionic 1 I solved this with

disableAnimate: true,
disableBack: true

Would be really useful, for example, to fully remove the Login page of my application from the history once a successfully login was performed.


I am using something like this:

this.nav.push(TabsPage).then(() => {
  const index = this.nav.getActive().index;
  this.nav.remove(0, index);


Awesome, work like a charm. Thx


you can try this one too…

  .then(() => {
    const index = this.viewCtrl.index;



Is this.nav.setRoot(…) what you need?