I'm receiving the following error when using Knockout 3.4.0 and KO Punches 0.5.1 with ko.punches.enableAll();
defined:
Uncaught ReferenceError: Unable to process binding "text: function (){return orderId }"
Message: orderId is not defined
<table class="table table-hover">
<tbody>
{{#foreach: orders}}
<tr>
<td class="fixed"><i class="glyphicon glyphicon-shopping-cart"></i></td>
<td><a href="javascript:;">{{orderId}}</a></td>
<td>{{orderStatusTypeDescription}}</td>
<td>{{orderDate}}</td>
</tr>
{{/foreach}}
</tbody>
</table>
var vm = this;
this.orders = ko.observableArray();
ctx.svc.getOrders(1)
.then(function (orders) {
vm.orders(orders);
});
[
{
"orderId": 10001,
"customerId": 1,
"orderStatusTypeId": 7,
"orderStatusTypeDescription": "Accepted",
"orderDate": "2012-04-23T18:25:43.511Z"
},
{
"orderId": 9631,
"customerId": 1,
"orderStatusTypeId": 4,
"orderStatusTypeDescription": "Cancelled",
"orderDate": "2012-04-23T18:25:43.511Z"
},
{
"orderId": 9014,
"customerId": 1,
"orderStatusTypeId": 8,
"orderStatusTypeDescription": "Printed",
"orderDate": "2012-04-23T18:25:43.511Z"
},
{
"orderId": 9000,
"customerId": 1,
"orderStatusTypeId": 9,
"orderStatusTypeDescription": "Shipped",
"orderDate": "2012-04-23T18:25:43.511Z"
}
]