In my Vue application, I have a Settings page with child routes such as settings/user, settings/addUser, etc. I am looking to implement a back button that when pressed, takes the user back to the specific page they visited within the Settings section. Using this.$router.go(-1)
seems to only take me back one page, which is not always the desired behavior.
Currently, I have the following setup:
<v-btn class="my-2" small fab rounded color="primary" block :to="/home">
<v-icon color="black">
mdi-home-export-outline mdi-flip-h
</v-icon>
</v-btn>
This code snippet is placed in settings.vue
, where the <router-view>
is present for rendering child routes.