Vue-router icon indicating copy to clipboard operation
Vue-router copied to clipboard

Thank you & How to Remove '#' on my URL

Open daksamedia opened this issue 5 years ago • 1 comments

Hi @hayanisaid ,

Thank you for your tutorial, it made me understand how vueJS router really works is.

But my questions is, I got this on my URL :

http://localhost:8080/#/

What I expect is like this :

http://localhost:8080/

How do I remove hash mark on my URL?

daksamedia avatar Jul 10 '19 04:07 daksamedia

Hi, it

Hi @hayanisaid ,

Thank you for your tutorial, it made me understand how vueJS router really works is.

But my questions is, I got this on my URL :

http://localhost:8080/#/

What I expect is like this :

http://localhost:8080/

How do I remove hash mark on my URL?

Hi @daksamedia It is not my repo, but you can remove it easily with mode: history, when you call new router:

const router = new VueRouter({ mode: 'history', routes: [...] })

more you'll find here: https://router.vuejs.org/guide/essentials/history-mode.html

Hope it helps.

danielbehina avatar Aug 06 '19 13:08 danielbehina