C
C
colorkid2017-04-29 16:22:34
JavaScript
colorkid, 2017-04-29 16:22:34

How to implement list rendering inside a VUE JS component?

Hello. I want to expand my slider with buttons to switch to a specific slide.
Here is the code https://jsfiddle.net/prL6axfL/8/
I want to draw as many buttons as there are img in the array. They should be drawn inside the buttons /buttons component, but I can't. Of course, if I do such a thing outside the buttons template v-for="item in src" div class="button" /div /template component, then everything is ok, well, or buttons v-for="item in src" /buttons , also normal . BUT I need exactly INSIDE the buttons /buttons component how to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
colorkid, 2017-04-29
@colorkid

I seem to have figured it out. If anyone is interested, it was simply necessary to pass an array through the input parameters along the length of which the list is rendered and then to the template component template: 'v-for="item and that's it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question