Skip to content

Instantly share code, notes, and snippets.

@tomdcc
Created August 26, 2014 03:11
Show Gist options
  • Save tomdcc/f66b479a3732cc5ac8c8 to your computer and use it in GitHub Desktop.
Save tomdcc/f66b479a3732cc5ac8c8 to your computer and use it in GitHub Desktop.
theModule.config( function($httpProvider) {
$httpProvider.responseInterceptors.push(["$q", "$timeout", function ($q, $timeout) {
return function (promise) {
var defer = $q.defer();
$timeout(function () {
promise.then(function (data) {
defer.resolve(data);
});
}, 500);
return defer.promise;
};
}]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment