Answer the question
In order to leave comments, you need to log in
VUE router how to link to a file?
Hello everyone, I can’t figure out how to connect a file in vue router to a component.
Everywhere in the examples they write var Secter = require('... path to the file');
I work without nodejs, so the request does not work for me, I don’t understand the logic, how can I call the file then without a node?
//Как правильно вызвать в компонент файл?
var Secret = './view/Secret.vue';
const routes = [
{ path: '/secret', component: Secret }
]
const router = new VueRouter({
routes
})
const app = new Vue({
router
}).$mount('#app')
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