[SOLVED] Blank page when using beforeEnter route
-
I am trying beforeEnter and have weird issue when page render white (blank), but console show no error
path: '/home', component: () => import('layouts/home.vue'), children: [ { path: 'list/files/:id_donvi?/:id_phong?', component: () => import('pages/docs/list/files.vue') , beforeEnter: (to, from, next) => { console.log(to) } },
In console I could see the log of “to” variable. But page show nothing. I have search and found someone enter the same issue but no solution.
Hope anyone could give a help. Tks
-
ps: when comment out beforeEnter everthing work fine. So it s not a problem of template, page
-
@maxxiris said in Blank page when using beforeEnter route:
ps: when comment out beforeEnter everthing work fine. So it s not a problem of template, page
Read vue router docs, guards should call next function.
-
My ignorance, must call next() function to process. I think this is just a hook and call before route change