vue learning addresses with a #

Address vue accessible with a # sign, this is actually the VUE # HASH pattern generated, correct point is because VUE use HASH mode.

If you do not want to have # how to do: change the route of the Router mode as history can be.

Modify src-> router-> index.js in

import Vue from 'vue'
import Router from 'vue-router' Vue.use(Router) export default new Router({ mode: 'history' //把Router的mode修改为history模式,VueRouter默认的模式为HASH模式 })

Guess you like

Origin www.cnblogs.com/cngsl/p/11963768.html