You can't remove all the pages in the navigation stack


#1

Not sure what the problem is but when using
<h3 navPop> Go Back </h3>

Which is taken from the documenataion
<button ion-button navPop>Go Back</button>

Give the error:
You can't remove all the pages in the navigation stack

But the follogin code
<h3 (click)="goBack()"> Go Back </h3>

With the code inside the component - works

goBack() {
  console.log("Going back");
  this.navCtrl.pop();
}

What’s the difference between navPop as an attribute vs inside a function ?
I wanted to reduce my code … I feel I could save some lines here …


#2

hello

it happens to me exactly the same and I do not know why, I hope someone answers or I’m using the navPop wrongly.