I have an array of JSON items, and I am trying to use v-repeat
to output it as a series of table rows:
<tr v-repeat="items">
<td>{{code}} </td>
<td> {{description}}</td>
<td>
{{price}}
</td>
<td><input v-model="quantity" type="text" size="4"/></td>
<td> {{total = price * quantity}}</td>
</tr>
A row with empty cells is output for every item in the JSON - so Vue.js is not getting the property values, even though I have confirmed that they are definitely exist and I can get the values in the v-repeat if I do something like this:
{{items[$index].code}}
I am getting no errors or warnings.
This is the JSON output of my Vue data object:
{ "items":[{
"id": "408",
"product_id": "6",
"description": " item description here... ",
"price": "1210.26",
"created_at": "2015-06-04 15:10:14",
"updated_at": "2015-06-04 15:10:14",
"quote_id": "32",
"quantity": "1",
"code": "PI0055"
}]}