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 The Difference Between One-Way Binding And Two-Way Binding?
What is @inject()?
What is a scope in a project?
What are Modules in AngularJS?
What is the spa (single page application) in angularjs?
What is the use of filter in angularjs?
What is the difference between a stateful and stateless component in angularjs?
What is the use of restrict and template property when creating custom directives?
Explain how $scope.$Apply() works
Difference between display:none & visiblity:hidden?
How is shadow dom helping angular 2 to perform better?
Is angular a good career?