You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Error: destination.push is not a function
copy@file:///C:/test/angular.js:556
ResourceFactory/</Resource[name]/<@file:///C:/test/angular-resource.js:389
qFactory/defer/deferred.promise.then/wrappedCallback@file:///C:/test/angular.js:6650
qFactory/ref/<.then/<@file:///C:/test/angular.js:6687
Scope.$eval@file:///C:/test/angular.js:7840
Scope.$digest@file:///C:/test/angular.js:7707
Scope.$apply@file:///C:/test/angular.js:7926
done@file:///C:/test/angular.js:8933
completeRequest@file:///C:/test/angular.js:9073
createHttpBackend/</<@file:///C:/test/angular.js:9023
createHttpBackend/jsonpReq/doneWrapper@file:///C:/test/angular.js:9085
file:///C:/test/angular.js
Line 5582
The text was updated successfully, but these errors were encountered:
Oh, I think I understand what is going on. Essentially you are bumping into the same issue as: #1044
Seems like you are trying to do a query method that should return an array but your back-end returns something that is not an array. With $resource you need to make sure that the type of data returned is the same as the expected type (array or object) in the $resource definition.
Closing this one for now, please post something on the mailing list if you need further help with using $resource.
As suspected your get action doesn't expect an array but your back-end returns an array. So you either need to specify isArray on your action level as described here: http://docs.angularjs.org/api/ngResource.$resource or have your back-end return an object. Not sure what you are expecting as a result so hard to advice more.
Anyway, it sounds more like a general question about AngularJS usage and not a bug report / feature request. As such would be better asked on the mailing list (https://groups.google.com/group/angular) or the IRC (#angularjs) channel. The mailing list is very active and people there will be happy to help.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Stack trace:
Error: destination.push is not a function
copy@file:///C:/test/angular.js:556
ResourceFactory/</Resource[name]/<@file:///C:/test/angular-resource.js:389
qFactory/defer/deferred.promise.then/wrappedCallback@file:///C:/test/angular.js:6650
qFactory/ref/<.then/<@file:///C:/test/angular.js:6687
Scope.$eval@file:///C:/test/angular.js:7840
Scope.$digest@file:///C:/test/angular.js:7707
Scope.$apply@file:///C:/test/angular.js:7926
done@file:///C:/test/angular.js:8933
completeRequest@file:///C:/test/angular.js:9073
createHttpBackend/</<@file:///C:/test/angular.js:9023
createHttpBackend/jsonpReq/doneWrapper@file:///C:/test/angular.js:9085
file:///C:/test/angular.js
Line 5582
The text was updated successfully, but these errors were encountered: