Recently i created a PhoneGap App for mobile devices, using AngularJS as javascript framework.
I have a PHP backend serving Restful JSON data, build in Laravel PHP Framework.
The PhoneGap App requests data from my PHP Server with the $http service in AngularJS, and it works perfectly on my mobile phone.
Now i wanted to make my PhoneGap App available on a website temporarily instead of in an App. So i moved my PhoneGap project to a webserver, but here it doesnt work at all. I get these errors when trying to use the webapp in my own browser.
"Origin http://somewebsite.com is not allowed by Access-Control-Allow-Origin.".
I tried to add some config parameters to AngularJS such as:
delete $httpProvider.defaults.headers.common['X-Requested-With'];
But nothing seems to help.
I find it kinda weird that it worked as a PhoneGap app on my phone and in my iPhone Emulator, but it doesnt work on my new webserver domain.
Anyone know what to do?