Url start with (#)
-
hello everyone, my problem is how to replace the (#) in url.
example: http://localhost:8080/#/login
there always one # in my url, is there any ideas about this? -
This has to do with Vue Router hash mode, which is its default mode. You may be interested in Vue Router’s history mode. But you need to understand the differences as it has an impact to the public path (you probably going to need to change it to “/”). Switching to history mode will force you to revise all static assets paths used in your app. Head on to Vue Router’s documentation: https://router.vuejs.org/en/
-
@rstoenescu said in Url start with (#):
Vue Router’s history mode
Thanks for reply, i check it out, which means in quasar-framework i have to replace value of build.publicPath in /config/index.js with non-empty string, switching to history mode?
But it seems do not work …
-
@ballma have you also set history mode in src/router.js ? Please read Vue Router documentation top bottom.
-
@ballma thanks for calling attention to this. Setting
vueRouterMode: 'history',
in myquasar.conf.js
cleared things right up. This was aquasar create
project and maybe the install script could give you thehistory
option as doesvue create
. In any event: happiness in Mudville.