Skip to content

Commit

Permalink
Split up router configuration into index.js and routes.js file for ro…
Browse files Browse the repository at this point in the history
…utes testing
  • Loading branch information
techlab23 committed Jun 30, 2019
1 parent 2db41b8 commit 5861141
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
24 changes: 2 additions & 22 deletions src/router/index.js
@@ -1,29 +1,9 @@
import Vue from "vue"
import Router from "vue-router"
import Dashboard from "@/views/Dashboard.vue"
import TaskBoard from "@/views/TaskBoard.vue"
import routes from "./routes"

Vue.use(Router)

const router = new Router({
// mode: 'history',
routes: [
{
path: "/",
name: "home",
redirect: "/dashboard"
},
{
path: "/dashboard",
name: "dashboard",
component: Dashboard
},
{
path: "/boards/:id",
name: "task-board",
component: TaskBoard
}
]
})
const router = new Router({ routes })

export default router
20 changes: 20 additions & 0 deletions src/router/routes.js
@@ -0,0 +1,20 @@
import Dashboard from "@/views/Dashboard.vue"
import TaskBoard from "@/views/TaskBoard.vue"

export default [
{
path: "/",
name: "home",
redirect: "/dashboard"
},
{
path: "/dashboard",
name: "dashboard",
component: Dashboard
},
{
path: "/boards/:id",
name: "task-board",
component: TaskBoard
}
]

0 comments on commit 5861141

Please sign in to comment.