Restoring scroll position when going from home to scene to home.

This commit is contained in:
2020-02-10 01:27:13 +01:00
parent f5b60ac743
commit 48b1f15070
6 changed files with 44 additions and 14 deletions

View File

@@ -17,11 +17,15 @@ Vue.use(VueRouter);
const routes = [
{
path: '/',
redirect: { name: 'home' },
},
{
path: '/home',
component: Home,
name: 'home',
},
{
path: '/scene/:releaseId/:releaseTitle?',
path: '/scene/:releaseId/:releaseSlug?',
component: Release,
name: 'scene',
},
@@ -74,6 +78,9 @@ const routes = [
const router = new VueRouter({
mode: 'history',
routes,
afterEach(to, from) {
console.log(to, from);
},
});
export default router;