I am trying to redirect the page but I get an error. I think my definitions are correct, why am I getting this error?
Thank you for your help in advance, thankfully you are there.
router.js
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router);
import Homepage from './screens/Homepage';
import Journey from './screens/Journey';
const router = new Router({
mode: 'history',
routes: [
{
path: '/',
component: Homepage
},
{
path: '/journey',
component: Journey
}
]
});
export default router;
main.js
import Router from './router';
new Vue({
store: Store,
router: Router,
el: '#app',
render: h => h(App)
});
my Push..
this.$router.push('/journey');
this.$router.push('/journey')
, is it in a component? – Shaya Ulman