Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vuejs scrollBehavior

const router = createRouter({
  scrollBehavior(to, from, savedPosition) {
    // always scroll to top
    return { top: 0 }
  },
})
Source by next.router.vuejs.org #
 
PREVIOUS NEXT
Tagged: #vuejs #scrollBehavior
ADD COMMENT
Topic
Name
4+1 =