|
var app = angular.module('app', ['ionic']);
app.factory('mylanjieqi',function($ionicLoading,$q) {
var interceptor = {
'request': function (config) {
$ionicLoading.show();
return config;
},
'response': function (response) {
$ionicLoading.hide();
return response;
},
'requestError': function (rejection) {
console.log('reqerr');
$ionicLoading.hide();
return $q.reject(rejection);
},
'responseError': function (rejection) {
console.log('reserr');
$ionicLoading.hide();
return rejection
}
}
return interceptor;
})
ionic.bundle.js:13248 Uncaught Error: [$injector:cdep] Circular dependency found: $http <- $templateRequest <- $compile <- $ionicTemplateLoader <- $ionicLoading <- mylanjieqi <- $http <- $templateFactory <- $view <- $state
|
|