How to have a custom history and display the back buttons on a deep link?


Is there a way to construct the history when accessing a deep link?
For instance when reloading the url /trips/africa/casablanca
the ion-back-button should display and go back to /trips/africa
and then to /trips and finally to /home



You must specify defaultHref property of ` ion-back-button; When you go straight to a page and press back button you will get the expected behavior.

According to official documentation:

Description The url to navigate back to by default when there is no history.


1 Like

Thanks! I missed that in the doc! It worked like a charm! :slight_smile: