Quantcast
Channel: Rick Strahl's Web Log
Viewing all articles
Browse latest Browse all 664

Mixing $http Promises and $q Promises for cached Data

$
0
0
When creating services it's often useful to return data from the $http service, or cached data that already exists. You can't however just return the cached data, but have to turn it into a promise so it matches the $http callback signature. Here's how to deal with this frequent scenario.

Viewing all articles
Browse latest Browse all 664

Trending Articles