AngularJS. Possible to add custom properties on a $resource factory? <p>I have a HTTP based RESTful APIs When i connect for example to www.domain.com/chiamate/ELSENWZ i got this result:</p> <pre><code>{ "TICKET": "155112-I", "TICKET_2": "ATRE6463", "ACCOUNT_NAME": "PIPPO", "CUSTOMER_NUMBER": "AG5", "PROBLEM_TYPE": "H", "VENDOR": "ITALWARE-CON", "DESCR": "HP 6300 PRO SFF", } </code></pre> <p>I have implemented into AngularJS a service to use the rest api in this way:</p> <pre><code>var services = angular.module('ngdemo.services', ['ngResource']); services.factory('ChiamataFactory', function ($resource) { return $resource('/chiamate/:id', {}, { show: { method: 'GET', isArray: false, // &lt;- not returning an array transformResponse: function(data, headers){ var wrapped = angular.fromJson(data); alert(JSON.stringify(wrapped, null, 4)); angular.forEach(wrapped.items, function(item, idx) { wrapped.items[idx] = new Post(item); //&lt;-- replace each item with an instance of the resource object }); return wrapped; } }, create: { method: 'POST' }, update: { method: 'PUT', params: {id: '@id'} }, }) }); </code></pre> <p>because i want that when the controller use the service,</p> <pre><code>$scope.chiamata = ChiamataFactory.show({id: 'ELSENWZ'}); </code></pre> <p>into result i need to add some extra properties.</p> <p>The problem is that the service don't use the transformResponse</p>