I am running my code using java and angularjs. The server is hosted in port http://localhost:8080 When I hit http://localhost:8080/data, I get below error
XMLHttpRequest cannot load http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
$routeProvider
.when('/', {
templateUrl: 'views/home.html',
controller: 'MainCtrl'
})
.when('/data', {
templateUrl: 'http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?'
})
I am new to Angular. Can any one help what I am doing wrong in my code. I have searched in google and found some suggestions to enable headers at server side or at the browser end. I am looking if something I can do from my code itself. I know there are lot of similar question asked in this forum but not able to find the right solution. If anyone can help me by providing any link instead of giving me downvote