vue router mode
index.js
import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
Vue.use(Router)
export default new Router({
routes: [{
path: '/',
name: 'HelloWorld',
component: HelloWorld
},
],
// mode: 'hash', //hash模式下,浏览器地址不规整,带有#
mode: 'history', //history模式下,浏览器地址规整,但需要后台支持
})