This repository has been archived by the owner on Sep 18, 2019. It is now read-only.
2.0.14
- Added
ifCached
method to the$http
promise that matchesthen
callback argument structure; deprecatecached
method ifuseLegacyPromiseExtensions
is set tofalse
. (#51)
Example:
promise
.then(function successHandler (response, itemCache) {
var data = response.data
data._fullName = data.first_name + ' ' + data.last_name
itemCache.set(data)
self.fullName = data._fullName
})
.ifCached(function (response, itemCache) {
self.fullName = response.data._fullName
})
Thank you for your contribution on this one, @Tommatheussen!