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 async pipe in angular?
How to manage cookie in AngularJS?
Explain route configuration? And explain with code?
What is feature modules?
Explain the ng-model directive in angularjs.
What classes should I add to module's declarations?
What an angular 5 component made of? How do you generate a new component?
What is hoisting in js?
What is services in angular?
Can angularjs be used for backend?
What is mvc5?
When did you use currency filter in angularjs?