I am trying to GET information from this site https://bitcoinindex.es/api/v0.1/coinbase/usd/btc/last
Using the $http service
After looking all over the internet Here is my code in coffeescript
angular.module('blackmoonApp')
.controller 'PricingCtrl', ($scope, $http) ->
$http.defaults.useXDomain = true
$http.get("https://bitcoinindex.es/api/v0.1/coinbase/usd/btc/last",
headers:
"Access-Control-Allow-Origin": "*"
).success (JSON) ->
console.log JSON
The Result is
"XMLHttpRequest cannot load https://www.bitstamp.net/api/ticker/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9000' is therefore not allowed access."
I am not sure if the website is blocking me (which wouldn't make sense because it is an API) or if AngularJS isn't able to work with CORS.