How to change current route in vue-router

The path you’ve supplied to the <router-link> is a relative path. You need to prefix the path with a / so that it is relative to the root of the website, rather than the current page:

<router-link
        :to="{ path: `/homes/${this.$route.params.search}/rent/` }"
        tag="p"
      >
        Rent
</router-link>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top