How to solve cross-domain-issue I do call json like this, but here I am getting cross domain error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://.........json. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
my code
app.factory('appServices', function($http){
var servicesData = {};
servicesData.homeSearch = function(){
return $http({
method: 'GET',
url : 'http://sg.media-imdb.com/suggests/t/tita.json'
}).success(function(data, status , header, config){
console.log('Success')
})
.error(function(data, status , header, config){
console.log('error')
});
}
return servicesData;
});
Full code here http://codepen.io/shibinragh/pen/obxGmQ
Sorry I am a beginner in development, I don't know much about cross-domain issue