Created
August 21, 2017 02:51
-
-
Save ccnokes/054d28811c73782c8d946d2318d493d5 to your computer and use it in GitHub Desktop.
AngularJS $http cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this will cache the response indefinitely in a cache created via $cacheFactory | |
// that cache is shared globally among all $http requests | |
$http.get('http://pokeapi.co/api/v2/pokemon/1/', { | |
cache: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment