Vue-Resource の使い方を学んでいますが、使用している API で壁にぶつかりました。を使用してスレッドのリストを設定しようとしていv-for: thread in threads
ます。
これが私が取り組んでいるもののサンプルです:
[{
"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
}]
{{ thread.name }}{{ thread.com }}
APIには、いくつかのページにリストされたスレッドがあります。私が欲しいのは、それぞれのようなリストですが、no
vue-resourceを使用してその情報を取得する方法が完全にはわかりません. 現在、私が使用している場合
<li v-for="thread in threads"> {{ thread.name }}{{ thread.com }} </li>
空のアイテムのリストを取得するだけです。