javascript

allows keeping the URL while rendering a different page

beforeEnter(to, from){
//super code goes here
return {
        name: 'NotFound',
        // allows keeping the URL while rendering a different page
        params: { pathMatch: to.path.split('/').slice(1) },
        query: to.query,
        hash: to.hash,
      }
}
Was this helpful?