Default # appends in the URL
I set up the theme in my system and it works like a charm. The issue is it appends the #
in my URL. I tried to check about that didn't get any success.
Is there anything I need to change?
My URL: http://localhost:8080/#/dashboard
When I removed hash from the URL it redirects me as per below URL
Replies (1)
Hi Vinay,
To remove # from URL you have to switch a vue-router mode from hash mode to HTML5 mode.
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(),
routes: [
//...
],
})
Please notice that it will require an additional server configuration to work properly in production mode.
Check examples in the vue-router doc:
https://router.vuejs.org/guide/essentials/history-mode.html#html5-mode