How can I access a dynamically created item outside of a v-for loop in Vue.js?
<li v-for="item in cart.items">
<h1>{{ item.product.name }}</h1>
</li>
<p>Is it possible to access {{ item.product.name }} outside the loop?</p>
data () {
return {
cart: {
items: []
},
products: [
{
name: "name"
},
{
name: "name2"
}
]
}
}