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?