Skip to content

Instantly share code, notes, and snippets.

@mfreeman451
Created March 28, 2019 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfreeman451/1530cbdbca47ab837853ad3424ea5e16 to your computer and use it in GitHub Desktop.
Save mfreeman451/1530cbdbca47ab837853ad3424ea5e16 to your computer and use it in GitHub Desktop.
Quasar-amplify-demo
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