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);};}]);