Answer the question
In order to leave comments, you need to log in
And once again how to connect a component to a component in vue-cli?
I am studying vue-cli, there is a main App.vue component inside there is a Card.vue with a photo, now I found the Lightbox component for Vue.js and I want to use it
npm install --save vlightbox //installed
how to connect it correctly and
tried to use it in main. js add
import lightbox from 'vlightbox'
Vue.use(lightbox)
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
template: '<App/>',
components: { App,lightbox }
})
<lightbox
:images="images"
title="Feed Gallery"
></lightbox>
Answer the question
In order to leave comments, you need to log in
And what kind of mistake is that?
In main.js it should be like this:
import lightbox from 'vlightbox'
Vue.use(lightbox)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question