Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue scrollbehavior typescript

scrollBehavior (to, from, savedPosition) {
  if (to.hash) {
    return {
      selector: to.hash,
      behavior: 'smooth',
    }
  }
}
Source by router.vuejs.org #
 
PREVIOUS NEXT
Tagged: #vue #scrollbehavior #typescript
ADD COMMENT
Topic
Name
2+1 =