i'm using router.push to change the route,it works,but:
router.push({path:'xxx'}
the result in my browser shows that, this is a '#(hash) mode push', the address look like:
localhost:8080/index/xxx#
how can i make a push without #(hash),like this:
localhost:8080/index/xxx
i have already set mode:'history' in 'router.js'
const router = new Router({
mode: 'history',
base: proc...
sorry my bad English
here is my code:
methods: {
changeIdx (item) {
console.log(
this.currentURL.slice(0, this.currentURL.lastIndexOf('/') + 1) + this.urlStore[item]
)
this.$router.push(
this.currentURL.slice(0, this.currentURL.lastIndexOf('/') + 1) + this.urlStore[item]
)
}
in console: console.log
in browser: address in browser