I'm learning how to use Vue-Resource and I've hit a wall with the api I'm working with. I'm trying to set up a list of threads using v-for: thread in threads
.
Here's a sample of what I'm working with:
[{
"threads": [{
"no": 1,
"name": "John",
"com": "comment"
},{
"no": 2,
"name": "Jim",
"com": "comment"
},{
"no": 3,
"name": "Jane",
"com": "comment"
}],
"page": 0
}, {
"threads": [{
"no": 4,
"name": "Tom",
"com": "comment"
},{
"no": 5,
"name": "Mark",
"com": "comment"
}],
"page": 1
}]
The api has threads listed across a few pages, what I want is a list that looks something like {{ thread.name }}{{ thread.com }}
for each no
but I'm not entirely clear on how to grab that information using vue-resource. Currently if I use
<li v-for="thread in threads"> {{ thread.name }}{{ thread.com }} </li>
I just get a list of empty items.