Manipulating Angular navigation history on reload


My use case simple: how could I use the ion-back-button after a page has just reloaded ?

Let’s say I’m loading directly the page app/product/2132235/edit-product, how could I use ion-back-button to go to app/product/ ?

Angular doesn’t have a navigation history as we used to have in Ionic 3.

Thank you

According the code there is an option defaultHref for back button, is that maybe what you are looking for?


  • The url to navigate back to by default when there is no history.
    @Prop() defaultHref?: string;