No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    [SOLVED] Blank page when using beforeEnter route

    Framework
    2
    4
    773
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      maxxiris last edited by maxxiris

      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

      1 Reply Last reply Reply Quote 0
      • M
        maxxiris last edited by

        ps: when comment out beforeEnter everthing work fine. So it s not a problem of template, page

        metalsadman 1 Reply Last reply Reply Quote 0
        • metalsadman
          metalsadman @maxxiris last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • M
            maxxiris last edited by

            My ignorance, must call next() function to process. I think this is just a hook and call before route change

            1 Reply Last reply Reply Quote 1
            • First post
              Last post