× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Way to add caching to get request in ngresource object?

Nishant
Aug 20, 2015
<pre><code class="language-javascript">(function() { 'use strict'; angular .module('dashboards') .factory('OfferedServices', OfferedServices); OfferedServices.$inject = ['$resource', 'APIEndPoint']; /* @ngInject */ function OfferedServices($resource, APIEndPoint) { return { getServiceList: getServiceList } function getServiceList() { return $resource(APIEndPoint.URL_GET_SERVICES_LIST, {}, { get: { method: 'GET', cache: true } }); } } })();</code></pre> <p> </p>
comments powered by Disqus