3

Javascript コード...

commonApp = angular.module('commonApp') 
.config(function($httpProvider){
        $httpProvider.interceptors.push('myHttpInterceptor');
})
.factory('myHttpInterceptor', function($q, $window){
        return {
               request: function(config){
                       console.log('Request started'); // LOG AT REQUEST START
                       return config || $q.when(config);
                }
        };
 });

メッセージは xhr リクエストの最初にログに記録する必要があると思います。しかし、xhr リクエストのないログが表示されます。

Chrome 開発ツールのスクリーンショット

私はAPIを誤解していますか?

4

1 に答える 1