Answer Posted / 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 |
Post New Answer View All Answers
Explain the differences between one-way binding and two-way binding.
What’s the difference between dirty, touched, and pristine on a form element?
What is link?
What is the use of @viewchild?
What is difference between angular and angularjs?
What do I have to do to trick the browser into doing what I want?
What is the function of the $timeout service?
What is the difference between link and compile in angular.js?
What's new in angular 8?
What is angular 6 and why it is used?
What is the difference between ngoninit() and constructor() of a component?
What is the use of services in angular 4?
Explain factory method in angularjs?
Explain what is scope in angularjs?
Can you explain spa architecture in angularjs?