Answer the question
In order to leave comments, you need to log in
How to get carousel instance in Vue if everything is connected via CDN?
Project on Laravel framework. I connected bootstrap and vue.js via cdn, because the project is simple, one-page. I have a menu that hangs on vue, which contains the bootstrap carousel, and I want to get an instance of it so that I can switch to certain pages through vue. Through jquery I know how to do it, but is it possible to do without it?
Answer the question
In order to leave comments, you need to log in
Inside the mounted() method, I wrote with regular js:
let myCarousel = document.querySelector('#carouselMenu');
this.carousel = new bootstrap.Carousel(myCarousel, {
//params
});
пока нашел только такой способ решения моей проблемы
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question