我的代码无效:
$scope.tableParams = new NgTableParams({}, {
page: 1,
getData: function($defer, params) {
// orderBy = $scope.tableParams.sorting();
// filter = $scope.tableParams.filter();
// console.log(orderBy);
// console.log(filter);
Restangular.one('events', $routeParams.eventId).getList('applications').then(function (apps){
var data = apps;
$defer.resolve(data);
// $log.debug('ok fetching apps:', apps);
});
}
});
此代码结果为
TypeError:$ defer.resolve不是函数
为什么?
答案 0 :(得分:0)