I am trying to load a json file cross domain, from http://xinruima.me/game/themes.json
I tried to write this in AngularJs for ES6:
getThemesOptions() {
const url = `http://xinruima.me/game/themes.json`;
return this.$http.jsonp(url)
.success(function(data){
console.log(data);
});
}
And then I found this online: http://jsfiddle.net/subhaze/a4Rc2/114/
It's an example to call a public api using the same syntax I wrote, it works.
But when I change the url to my url, it gives the error as I shown above:
I tested my json file and it's valid.
Any advice?