路由的 #号这种情况 怎么去掉
来源:7-2 购买详情页 - 添加路由(2)

慕桂英1611074
2017-03-24
这种情况怎么办
写回答
2回答
-
fishenal
2017-03-24
上面说得对, routes是 路由映射配置,只能放 path和component 那种对象。
mode: history 是 VueRouter本身的配置,放在实例化 VueRouter的 参数里, 跟routes映射表是同级关系。
10 -
Eden_frontend
2017-03-24
mode:'history'
let routes=[
{
path:'/apple',
component:Apple
},
{
path:'/banana',
component:Banana
}
];
let router=new VueRouter({
mode:'history',
routes
});要放在new 里面你放那位置不可能出来
10
相似问题