Answer the question
In order to leave comments, you need to log in
Using data from a Vue loop?
How to use data from v-for in h1 (category)?
Even I don’t understand, tell me pliz
maybe I need to somehow write them into a variable, then when I get it I can transfer them to other components
Code:
<div class="categories">
<div class="wrapper">
<ul>
<li v-for="(category, i) in categories" :key="i">
<a :href="category.link">{{ category.text }}</a>
</li>
</ul>
</div>
</div>
<div class="wrapper">
<div class="heading">
<h1> {{category.text}} </h1>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
While it looks like this, it should be two different components... Into which the desired category value is either taken or propped through the store
This is meaningless code.
<div class="categories">
<div class="wrapper">
<div class="heading">
<h1> {{category.text}} </h1>
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question