Created
January 20, 2021 14:18
-
-
Save renzon/f67dce3618b23e62f2ec93b55565e3c3 to your computer and use it in GitHub Desktop.
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
import Vue from 'vue' | |
import Router from 'vue-router' | |
import Index from '~/pages/index.vue' | |
import Perfil from '~/pages/perfil.vue' | |
import User from '~/pages/user/_username/index.vue' | |
import Todos from '~/pages/todos.vue' | |
Vue.use(Router) | |
export const routerOptions = { | |
mode: 'history', | |
routes: [ | |
{path: '/', component: Index, name: 'index'}, | |
{path: '/perfil', component: Perfil, name: 'perfil'}, | |
{path: '/user/:username', component: User, name: 'user'}, | |
{path: '/todos', component: Todos, name: 'todos'} | |
] | |
} | |
export function createRouter (ctx) { | |
return new Router(routerOptions) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment