angular

angular中$http服务的深入理解

2017-09-24  本文已影响25人  iqing2012

$http服务

  angular.module('myApp', [])
      .config(function($httpProvider, $cacheFactory) {
      $httpProvider.defaults.cache = $cacheFactory('lru', {
      capacity: 20
      });
      });
      现在,所有的请求都会使用我们自定义的LRU缓存了。
上一篇 下一篇

猜你喜欢

热点阅读