diff --git a/src/services/interceptor.js b/src/services/interceptor.js index 68dc95f..2fa431f 100644 --- a/src/services/interceptor.js +++ b/src/services/interceptor.js @@ -1,6 +1,5 @@ angular.module('ngLoading.interceptor', []) .factory('Interceptor', ['$document', '$injector', '$q', 'loading', '$log', function($document, $injector, $q, loading, $log) { - var defer = $q.defer(); var overlay, loadConfig; return { start: function() { @@ -16,6 +15,8 @@ angular.module('ngLoading.interceptor', []) }); }, request: function(config) { + var defer = $q.defer(); + //disable loading screen for a per request basis if(config.showLoading === false) return config; @@ -42,4 +43,4 @@ angular.module('ngLoading.interceptor', []) return response; } }; -}]); \ No newline at end of file +}]);