码迷,mamicode.com
首页 > Windows程序 > 详细

【vue2.0】去掉前面#,window下nginx代理配置

时间:2017-01-20 16:14:13      阅读:448      评论:0      收藏:0      [点我收藏+]

标签:history   routes   ext   dir   direct   home   nts   app   window下   

1、定义路由,设置路由配置

const routes = [
{
path: ‘/login‘,
component: require(‘./components/login/index.vue‘)
},
{
// = = = => /home
path: ‘/home‘,
component: Home
},
{
path: ‘/‘,
redirect: ‘/home‘
},
{
path: ‘*/*‘,
redirect: ‘/home‘
}
];

const router = new VueRouter({
routes,
mode: ‘history‘
});

var app = new Vue(
Vue.util.extend({router}, App)
).$mount(‘#app‘)

2、nginx代理配置

技术分享

 

 








 



 



 

【vue2.0】去掉前面#,window下nginx代理配置

标签:history   routes   ext   dir   direct   home   nts   app   window下   

原文地址:http://www.cnblogs.com/chcindy/p/6322733.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!