Here is my code to setup the vuejs routes and pass into router:
export const routesArray = {
routes: [
{
path: '/',
name: 'Add Stash',
component: Form
},
{
path: '/log',
name: 'Stash Log',
component: Stitch
},
{
path: '/user/register',
name: 'Register',
component: Register
},
{
path: '/user/login',
name: 'Log in',
component: Login
}
]
}
export default new Router(routesArray)
I'm importing this code into a Vue Component and using it to loop through the array and dynamically output the navigation like this:
This display works like a dream, but when I click on a nav item, it goes to a broken link: http://localhost:8080/log#/
I'm not sure how to get around that hash? Any ideas?
在Vue.js应用中,遇到一个问题:通过动态输出的导航菜单点击后,链接显示为带有'#'的错误路径。例如:http://localhost:8080/log#。代码展示了路由配置和组件导入,但点击导航条目导致了页面重定向失败。寻求解决方案。
1万+

被折叠的 条评论
为什么被折叠?



