I'm trying to access a restful API. This gives error. How to overcome this Cross domain issue?
The error is 'Access-Control-Allow-Origin' header is present on the requested resource
function Hello($scope, $http) {
$http.get('http://api.worldweatheronline.com/free/v1/weather.ashx?q=London&format=json&num_of_days=5&key=atf6ya6bbz3v5u5q8um82pev').
success(function(data) {
alert("Success");
}).
error(function(data){
alert("Error");
});
}
This is my fiddle http://jsfiddle.net/U3pVM/2654/