I have the following in my controller file:
var Subject = $resource(\'/api/TestAccounts/:action\', { applicationId: 3 }, {
\'getSelect\': { method: \'GET\
You need to set the paramater isArray
to true in your resource definition if you are returning an array from the server.
var Subject = $resource('/api/TestAccounts/:action', { applicationId: 3 }, {
'getSelect': { method: 'GET', isArray: true, params: { action: 'GetSelect' } }
});
See: AngularJS $resource API