Skip to content

Instantly share code, notes, and snippets.

@igorkosta
Created March 24, 2019 18:52
Show Gist options
  • Save igorkosta/9035059ef601d3f4e585afc810122a17 to your computer and use it in GitHub Desktop.
Save igorkosta/9035059ef601d3f4e585afc810122a17 to your computer and use it in GitHub Desktop.
src/router/routes/public.js
import Login from '@/views/Login.vue'
import Registration from '@/views/Registration.vue'
import ForgotPassword from '@/views/ForgotPassword.vue'
const routes = [
{
path: '/login',
name: 'login',
component: Login
},
{
path: '/registration',
name: 'registration',
component: Registration
},
{
path: '/forgot-password',
name: 'forgotPassword',
component: ForgotPassword
}
]
export default routes.map(route => {
const meta = {
public: true,
onlyLoggedOut: true
}
return { ...route, meta }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment