Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$resource feature - not able to do with angular-cached-feature #96

Open
angularPublic opened this issue Oct 21, 2017 · 0 comments
Open

Comments

@angularPublic
Copy link

angularPublic commented Oct 21, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant