Closed mort3za closed 10 years ago
I tested version 2.3.1 and it works without error but version 2.3.7 seems buggy.
angular-cache < 2.3.6 never officially supported promises, only recently has support been added. Now when you put
a promise into a cache, angular-cache calls .then
on the promise and inserts the resolved value when the then
callback fires.
@mort3za Try the following:
var temp = dataLoader('my/model.json');
my_model.put('cacheKey', temp);
temp.then(function () {
console.log(my_model.get('cacheKey');
});
I save a promise to cache, but when i want to use it from cache, it's undefined.
I think before updating angular-cache it was working but now has issue.