我有这个控制器:
$scope.allOrders = [];
OrdersFactory.query().$promise.then(function(data) {
$scope.allOrders = data;
});
$scope.gridOptions = {
data: 'allOrders',
columnDefs: [
{ name:'document_no', field: 'document_no' },
{ name:'waiter_name', field: 'waiter_name' }
]
};
工厂将获得此数据:
[
{
"id": 21,
"document_no": "RAC_21",
"waiter_name": "Name 2"
},
{
"id": 20,
"document_no": "RAC_20",
"waiter_name": "Name"
},
...
]
这是结果:
为什么它不显示我的数据和前往桌面?