Answer the question
In order to leave comments, you need to log in
Why is router-view not working?
I can't figure out why it doesn't work.
The dependency is set. In the folder: src created a folder: router in it the file router.js in it the following code:
import Vue from 'vue'
import Router from 'vue-router'
import vCatalog from '../components/v-catalog'
import vCatalog from '../components/v-cart'
Vue.use(Router)
let router = new Router({
routes: [
{
path: '/',
name: 'catalog',
component: vCatalog
},
{
path: '/cart',
name: 'cart',
component: vCart
}
]
})
export default router
<template>
<div class="v-main-wrapper">
<router-view></router-view>
</div>
</template>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question