Vue router history mode but when i use hash on url it reloads the page

Viewed 1270

I am using vue router and have already set mode to history. My app works fine except that when i try to use hash (#) in url in order to scroll the page to an element in the same page (eg: #information) the page reloads (meaning it re-requests data from my backend). I think the router thinks the page has changed and tries to load that page.

EDIT: The page does not really reload. It re-fetches data from by backend. I understand this as a reload though.

I tried googling but all i get is how to use history mode. Maybe i am searching the wrong way.

Any clues on how to fix this?

Here is my route:

{
            path: '/p/:idormpn/:slug',
            name: 'Productpage',
            component: Productpage
        }

Here is an example of what is happening: https://www.e-checkout.gr/p/63529/dermatina-anatomika-pedila-mavro

Thanks!

0 Answers
Related