I am developing a Vue.js application and it is difficult for me to bind the binding to a specific div inside the component.
I have the following anchor:
<a href="#porto" class="porto-button">Porto, Portugal</a>
and the following div:
<div id="porto" class="fl-porto">
I am using vue-router in hash mode.
The problem is that whenever I click the "porto-button" button, it redirects me to the "home" page ('/')
I am using Vue.js 1.X and I tried to use the history mode (URL without hashbang), but it gives me an error cannot GET '/page'while refreshing the page.
Am I doing something wrong? What can I do about this?
source
share