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

#1

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

#2

Hello.

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:

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

Regards

1 Like
#3

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