GiantBomb API with AngularTS

Avatar image for sunbro42
sunbro42

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By sunbro42

I'm new to AngularTS and I'm having trouble getting data from the API.

I keep getting this error: "No 'Access-Control-Allow-Origin' header is present on the requested resource".
I've tried it with the JSONP format and that doesn't work. Does anyone know of a surefire way to get this API up and running with Angular TypeScript, a simple example would be much appreciated, cheers!

Avatar image for ascagnel
ascagnel

175

Forum Posts

73

Wiki Points

0

Followers

Reviews: 0

User Lists: 7

#2  Edited By ascagnel

You've tripped a security feature of modern browsers: CORS. Mozilla has a pretty good breakdown of what you've run into: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Access-Control-Allow-Origin

(Sorry for the link, I'm on mobile and can't access the rich text tools)