Reputation: 1269
In my project there is a <router-link>
that directs to a specific page it looks like this
<router-link to="menugirl" >Plan your visit</router-link>
When you click on the button, this link will be directed to
http://localhost:8080/menugirl/category
The category
path that is added at the end of the URL is set by default
And so what is the problem - When I first click on the button and redirect to http: // localhost: 8080 / menugirl / category
In this case, this button is present at this address and when I click on this button a second time at http : // localhost: 8080 / menugirl / category
it already directs http: // localhost: 8080 / menugirl / menugirl
and I only need it to direct to http: // localhost: 8080 / menugirl / category
For a clear understanding, you can look at the demo
<router-link to="menugirl" >Plan your visit</router-link>
Upvotes: 1
Views: 72
Reputation: 3584
Not sure if I understood the issue but I think that is enough to add a slash in the beginning of the route like this:
<router-link to="/menugirl" >Plan your visit</router-link>
Upvotes: 4