vue.js - How to remove hashbang from url? -


how remove hashbang #! url?

i found option disable hashbang in vue router documentation ( http://vuejs.github.io/vue-router/en/options.html ) option removes #! , put #

is there way have clean url?

example:

not: #!/home

but: /home

you'd want set history true.

var router = new vuerouter({   history: true }); 

make sure server configured handle these links, though. vue-router docs link specifically: http://readystate4.com/2012/05/17/nginx-and-apache-rewrite-to-support-html5-pushstate/

for vue.js 2 use following:

const router = new vuerouter({  mode: 'history' }) 

and can see server configuration here: https://router.vuejs.org/en/essentials/history-mode.html


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -