i've the following ngResource defined:
angular.module('LicenseServices', ['ngResource']).
factory('License', function ($resource) {
return $resource('api/licenses/:id', { id: '@id' }, {
//...
'getLicenseTypes': { method: 'GET', url: 'api/licenses/types', isArray: true }
});
});
The result of the GET request is:
["Trial","Standard"]
But using the resource in a controller:
$scope.licenseTypes = License.getLicenseTypes()
i get the following result:
licenseTypes:
[ undefined, {
0: S
1: t
2: a
3: n
4: d
5: a
6: r
7: d
} ]
I'm using AngularJS 1.1.4 with Chrome.
Whats wrong with my resource definition?