I wanted to play around a little bit with OpenUI5 and JS Bin. And use a public JSON service for some mock data.
However I am not able to load data to my JSONModel from this public JSON service within JS Bin.
Please check My Example where I set the data manually and everything is working as expected. But after uncommenting this line (and of course commenting the next line):
oModel.loadData("http://jsonplaceholder.typicode.com/posts");
I would expect that the JSON model loads data from that service and displays the data in the output table.
Unfortunately after loading data when I try to check the oModel variable in the console, for example like this:
oModel.getData()
I am expecting that getData() returns that JSON data, but I am getting an javascript object. What am I missing? Is it even possible to use an public JSON service within JS Bin?
Thanks