我的控制器文件中有以下内容:
var Subject = $resource('/api/TestAccounts/:action', { applicationId: 3 }, {
'getSelect': { method: 'GET', params: { action: 'GetSelect' } }
});
Subject.getSelect({ applicationId: 3 },
function (resp) {
$scope.testAccounts = resp;
gridData = null;
}
);
我的服务器代码运行并返回:
[{"id":5,"name":"xxx"},{"id":6,"name":"yyy"}]
但是我收到以下错误:
TypeError: Object #<g> has no method 'push'
at copy (http://127.0.0.1:81/Scripts/angular.js:577:21)
有谁知道我做错了什么?