Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to enable caching in $http service?

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


Please Help Members By Posting Answers For Below Questions

Why is angular popular?

810


What are the new features in angular 6?

872


What is deep linking in angular 4?

847


How to configuring routes in angular js?

901


What is component in angular?

801


How to import css using system import?

919


Explain ng-hide directive?

822


How does a controller work?

782


How to catch and log specific angular errors in your app?

865


How google handles security in angular 4 applications?

828


What are the directive scopes in angularjs?

721


How to get the data from db?

863


What is the difference between angularjs and node.js?

756


What is injector in angularjs?

834


What are http interceptors?

768