ionicLoading not working


Any Idea what could be wrong ?

[$injector:unpr] Unknown provider: $ionicLoading$injector/unpr?p0=%24ionicLoading

var intercept = angular.module('services.interceptor', [

intercept.config(function ($httpProvider, $ionicLoading) {

    $httpProvider.interceptors.push(function ($q, $ionicLoading) {
        return {
            responseError: function (rejection) {
                if (rejection.status == 0) {
                            template: "Unable to process request. Probably connection is down.",
                return $q.reject(rejection);


one findings, that it does work when injected inside controller and run method but not in the config.

So it looks like the only way to sort this out if I want to still utilize this ionicLoader on global level is to
have interceptor only broadcast a event lets say.:, msg and in the RUN listen on this and there show a $ionicLoading



the problem is in config you can only use providers and not factories/controllers etc.
I would try using the $injector, or as you said with broadcast.

there is a similar post here:

here an other ressource:


Cool. Yepa I figured that i can call $injector from this post but at the end I liked this broadcast thing’-)