Remember positions on scroll.

This commit is contained in:
Roger Braun 2016-11-24 18:24:35 +01:00
parent 2341a3692a
commit ce0071d6e0

View file

@ -30,7 +30,10 @@ const routes = [
const router = new VueRouter({
mode: 'history',
routes
routes,
scrollBehavior: (to, from, savedPosition) => {
return savedPosition || { x: 0, y: 0 }
}
})
/* eslint-disable no-new */