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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -