angular 如何处理缓存

来源:互联网 发布:怎么打开tcp端口1433 编辑:程序博客网 时间:2024/06/05 09:19

angularjs 如何处理缓冲(cache)

这应该是一个必备技能,但是其实我对angular真正上手比较晚,所以对angular的缓存机制并不是很了解;

废话不多少 还上班呢 直接上代码
其他的还需要自己脑补、、、、、angular.module('app').service('cache', ['$cookies', function($cookies){    this.put = function(key, value){      $cookies.put(key, value);    };    this.get = function(key) {      return $cookies.get(key);    };    this.remove = function(key) {      $cookies.remove(key);    };}]);
0 0