How to enable caching in $http service?
Answer / chaitanya
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: });
| Is This Answer Correct ? | 1 Yes | 0 No |
What is directive in angularjs?
How to disable a control or element in angularjs?
Difference between angular 2, 4, 5, 6, &7?
List some inbuilt pipes available in angular
What are the components of a css style?
How to build mobile apps using ionic 3 cli and angular 4?
How to perform animation in angular?
What is angular cookie?
Mention some angularjs directives and their purpose?
What is the use of currency filter in angularjs?
What is difference between react and angular?
Difference between promises and observable?