diff options
| author | Sylvester Keil | 2013-02-26 10:22:12 +0100 | 
|---|---|---|
| committer | James deBoer | 2013-03-27 13:13:59 -0700 | 
| commit | 4ae46814ff4e7c0bbcdbbefc0a97277283a84065 (patch) | |
| tree | 2c5bcbe2d5bcc143043cb989d8b40899eb5ef8f9 /src/ng/rootScope.js | |
| parent | 5c735eb4ab07144a62949472ed388cb185099201 (diff) | |
| download | angular.js-4ae46814ff4e7c0bbcdbbefc0a97277283a84065.tar.bz2 | |
feat(http): support request/response promise chaining
myApp.factory('myAroundInterceptor', function($rootScope, $timeout) {
    return function(configPromise, responsePromise) {
        return {
            request: configPromise.then(function(config) {
                return config
            });
            response: responsePromise.then(function(response) {
                return 'ha!';
            }
        });
}
myApp.config(function($httpProvider){
    $httpProvider.aroundInterceptors.push('myAroundInterceptor');
});
Diffstat (limited to 'src/ng/rootScope.js')
0 files changed, 0 insertions, 0 deletions
