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 router-outlet directive in angular?
What is route guards?
Why angular material is used?
Can we use angularjs in android?
What is a factory?
What is angular mainly used for?
Explain angular elements?
Explain the procss about angular project bootstrap?
How angular 4 is different from angular 2?
How does a shaking tree work?
Please explain system.config.ts file used in angular?
How can we fix it?