S
S
semki0962019-05-31 15:51:56
Vue.js
semki096, 2019-05-31 15:51:56

How to create a nested component?

I display products in a cycle, in each product - a set of pictures

{% for product in currentproducts %}
         {% for img in product.img %}
                 <img width=30px src="/images/{{ img.img_name }}">
         {% endfor %}
{% endfor %}

I want to create for each set of pictures - a slider. Do I understand correctly that I need to create 2 components - a slider, and for each slider - a nested slide component?
I can’t figure out how the component itself and its template will look like in this case? I will be grateful for help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question