I want to get the value from methods and put this value in span element
There is my pseudo code and I don't know what is the right way to do that. Maybe stored in data?
<li v-for="item in items">
<span>{{I want this value is from methods}} getValue(item)</span>
</li>
methods: {
getValue: function(value){
return "value form methods" + value
}
}
Simple like that:
<li v-for="item in items">
<span>{{ getValue(item) }} </span>
</li>
methods: {
getValue: function(value){
return "value form methods" + value
}
}
Please do better with your questions quality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With