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 |
List the new features of angular 2?
When to use factory?
What is a decorator function?
What is transclusion in angular?
What is a component in angular 2?
How do you check if angular cli is installed?
How angular router works?
Which directive is used to hide elements from the html dom by removing them from that dom and not changing their styling?
Tell me can we use the open-source closure library with angular?
Angular 4 grid with crud operations what is angular router?
How to enable caching in $http service?
What are the possible ways to bind component properties to an associated template?