Ionic $http return status 0


Hi all,

i’m starting from ionic start myApp sidemenu project.
I added a simple button

<button ng-click="fun()" class="button button-block button-stable">Test</button>

this is my function on my controller:

$ = function() {
		var url = ""
		$http.get(url).success(function(data) {alert(data);}).error(function(data,status){alert(data+status);});

Now if i run on browser with ionic serve it works, if i run on ionic view it works, but if i run with ionic run android it return status 0.

Pleaase, any idea?


do you have this line in config.xml?

<access origin="*"/>


Hi @dany85,
Install this plugin

ionic plugin add cordova-plugin-whitelist 

you can see doc at


yes thanks it works!