I created a resource that receives the number of records from the recreation service as a text one. Angular makes an array of responses for each character. For example, if rest answers 20
, Angular will make an array [2,0]
. Can I fix this without changing the answer or using $http
?
var resource = angular.module('resource'); resource.factory('RecordResource', ['$resource', function($resource) { return $resource('/rest/records/:id', {}, { count: { method:'GET', url: "/rest/records/count", isArray: false, responseType: 'text' } } } ]);
source share