Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

2.0.14

Compare
Choose a tag to compare
@shaungrady shaungrady released this 15 Oct 04:05
· 79 commits to master since this release
  • Added ifCached method to the $http promise that matches then callback argument structure; deprecate cached method if useLegacyPromiseExtensions is set to false. (#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!