Created
March 28, 2019 21:54
-
-
Save mfreeman451/1530cbdbca47ab837853ad3424ea5e16 to your computer and use it in GitHub Desktop.
Quasar-amplify-demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const routes = [{ | |
path: '/', | |
component: () => import('layouts/MyLayout.vue'), | |
children: [{ | |
path: '', | |
name: 'todo', | |
component: () => import('pages/Todo.vue'), | |
meta: { | |
requiresAuth: true | |
} | |
}] | |
}, | |
{ | |
path: '/auth', | |
component: () => import('layouts/MyLayout.vue'), | |
children: [{ | |
path: '', | |
name: 'auth', | |
component: () => import('pages/Auth.vue'), | |
meta: { | |
requiresAuth: false | |
} | |
}] | |
}, | |
{ | |
path: '/profile', | |
component: () => import('layouts/MyLayout.vue'), | |
children: [{ | |
name: 'profile', | |
path: '', | |
component: () => import('pages/Profile.vue'), | |
meta: { | |
requiresAuth: true | |
} | |
}] | |
} | |
] | |
// Always leave this as last one | |
if (process.env.MODE !== 'ssr') { | |
routes.push({ | |
path: '*', | |
component: () => import('pages/Error404.vue') | |
}) | |
} | |
export default routes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment