Search code examples
javascriptangularjscorsdelicious-api

Allowing cross domain request to Delicious feed from Angular.js


I'm trying to get Delicious count with their feed with angularJs. In my previous code, simple jquery works, but with angular I get error

No 'Access-Control-Allow-Origin' header is present on the requested resource.

This is due to newer libraries CORS

This is jquery fiddle: http://jsbin.com/iVufAHuf/1/edit

This is angular fiddle: http://jsbin.com/OQUsuDuC/1/edit


Solution

  • You need to use

    $http.jsonp
    

    with correct callback syntax in url params. See.

    http://jsbin.com/EFeXuNap/2/edit