Question:How to enable caching in $http service? 

Answer You can enable caching in $http service by setting configuration property cache to true. When cache is enabled, $http service stores the response from the server in local cache. In this way, next time the response will be served from the cache without sending request to server.
$http.get("http://server/myserviceapi",{ cache:true }).sucess(function(){ 

//TO DO: 

});
 

+ Report
Total Preview: 1036
How to enable caching in $http service?
Copyright © 2024. Powered by Intellect Software Ltd