Open
Description
I am having a $resource defined as factory like below,
product-svc.js
(function() {
'use strict';
angular.module('module-name').factory('factory-name', factoryImplementation);
factoryImplementation.$inject = ['$resource'];
/* @ngInject */
function factoryImplementation($resource) {
return $resource('', {}, {
getProducts : {
method : 'GET',
url : 'http://locahost:8080/product',
params : {}
},
getProductById : {
method : 'GET',
url : 'http://locahost:8080/product/:id',
params : {}
}
});
}
})();
I just replaced $resource with $cachedResource. It is not working.
Can you help how can I do this?
Metadata
Metadata
Assignees
Labels
No labels