R
R
RacceGatel2021-07-28 11:05:21
Bootstrap
RacceGatel, 2021-07-28 11:05:21

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

1 answer(s)
R
RacceGatel, 2021-07-28
@RacceGatel

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 question

Ask a Question

731 491 924 answers to any question