Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Spinner not showing in android devices

$
0
0

@jdavid wrote:

I'm having trouble when I make calls at http android devices. The same works in Ionic View.

Your system information:

Cordova CLI: 5.4.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.12
Ionic App Lib Version: 0.6.5
OS: Windows 7 SP1
Node Version: v5.4.0

Definition on app.js:

$rootScope.$on('loading:show', function() {
 $ionicLoading.show({template: '<ion-spinner></ion-spinner><div>MSG1</div><div>MSG2</div>})
})

$rootScope.$on('loading:hide', function() {
   $ionicLoading.hide()
})

Interceptor on controller.js:

  $httpProvider.interceptors.push(function($rootScope) {
       return {
       request: function(config) {
         $rootScope.$broadcast('loading:show')
         return config
       },
       response: function(response) {
     $rootScope.$broadcast('loading:hide')
         return response
       }
     }
   });

Any idea?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>