I recently set up a Vue application and included some new routes. However, I'm encountering issues as they are not functioning as expected.
Here is the code in my router/index.js file:
import Vue from 'vue'
import Router from 'vue-router'
import QuestionList from '@/components/pages/QuestionList'
import SessionList from '@/components/pages/SessionList'
Vue.use(Router)
const router = new Router({
routes: [
{
path: '/questions',
name: 'QuestionList',
component: QuestionList
},
{
path: '/sessions',
name: 'SessionList',
component: SessionList
},
]
})
export default router
This is how my component looks like:
<template>
<h1>test</h1>
</template>
<script>
export default {
}
</script>
<style>
</style>
Despite setting localhost:8000/questions or localhost:8000/sessions, nothing appears to happen. Additionally, I am unable to see these components using Vue Dev Tools. Can anyone point out what may be wrong?