I want to split a row of a list and use the result in another list statement like this : I actually know that the syntax of Vue list renderer of this type is incorrect but I want to show you what I need!
var app = new Vue({
el : "#app",
data : {
list : [
{
'name' : 'aaa',
'codes' : '111+222+333'
},
{
'name' : 'bbb',
'codes' : '432+456+678'
}
]
}
})
<div id="app">
<div v-for="row in list">
<p>{{ row.name }}</p>
<div v-for="code in (row.codes.split('+'))">
<p>{{ code }}</p>
<div>
</div>
</div>
Update: The above code is correct and I had some problems when using filters like this that is wrong :
v-for="code in (row.codes | split('+'))"
<p>and<div>elements, and (3) add the missing})at the end of your code. jsfiddle.net/teddyrised/k1L7p9hm