$http request not working


I’m new to ionic but I love the framework.
I’m trying to create an app and I’m using the Yahoo! finance API to receive some data.
I’m using the angular $http.get method and everything works great when I test it on my browser.
When I test it on android virtual environment or on my real phone, the app stuck after the $http.get request and doesn’t return a promise…

I guess it has something to do with ionic or maybe I’m missing something?



Can you share your code?


Sure, I’m just trying to call a async call using the yahoo finance api

    .then(function(data) {
        $scope.currencyResult = data.data.query.results.rate.Rate;                       

For some reason when I try to build the apk using the ionic command, I receive an error, so I used the phonegap command and the build worked. Is it has something to do with that?


This is very strange.
It should be work.
What is the error?

I thought so too…
I receive 404 error

I copied the error details:



Just for testing purposes can you try with this: http://codepen.io/Vatsov/pen/WrEavb


I figured it out… just needed to add the cordova whitelist plugin (in cordova/phonegap its added by default)