Router back button to default if no history

I have a link like this:

 <a href="#" class="link back">

if there is no history to go back to, how can i make it so the router navigates to ‘/’ or another default route? as of now the button just does nothing if there is no history.

<a href="/page1" class="link back">...</a>

https://framework7.io/docs/view.html#linking-between-pages-views

1 Like