내 응용 프로그램을 안드로이드 에뮬레이터로 에뮬레이션하면 CordovaLog에서 오류가 발생합니다 메쏘드 setOptions in undefined.In 내 Chrome 브라우저에 문제가 없지만 내가 그것을 모방 할 때 결과가 좋지 않다, 내 모든 볼 수는 있지만 그것의 일부를로드하지 않고안드로이드에 내 응용 프로그램을 에뮬레이트 할 때 각도 캐시의 setOptions 메소드를 호출 할 수 없습니다.
(function() {
'use strict';
angular.module('EventList').factory('EventApi', [ '$http', '$q', '$ionicLoading', 'DSCacheFactory', EventApi]);
function EventApi($http, $q, $ionicLoading, DSCacheFactory)
{
var AllEventCache = DSCacheFactory.get("AllEventDataCache");
AllEventCache.setOptions({
onExpire: function (key, value) {
getAllEvents()
.then(function() {
console.log("Automatically refreshed");
}, function() {
console.log("Error putting Expired data");
AllEventCache.put(key, value);
});
}
});
})();
.run(function ($ionicPlatform, DSCacheFactory) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
var AllEventCache = DSCacheFactory("AllEventDataCache", { storageMode: "localStorage", maxAge: 360000, deleteOnExpire: "aggressive" });
});
})