angularjs - Unable to download JSON from CROS Domain request -
i wanted download json below url
http://www2.rsphinx.com/static/misc/cric_scores.json
server allowed cross domain requests also.
but every time getting error of cross domain request
i have used below code
var def = $q.defer(); $http({ method: 'get', url: scoreserviceurl }).success(function (data) { dummydata = data; def.resolve(data); }) .error(function (err, data, hf, g) { def.reject("failed score details"); }); return def.promise;
i have tried method jsonp, returns me 404 error. have tried http://www2.rsphinx.com/static/misc/cric_scores.json?callback=json_callback url not working.
can suggest me wrong doing here.
thanks
Comments
Post a Comment