I'm fetching some data from remote server using AngularJS $http. It's working in browser but not in phonegap developer app. But, ajax is working. What could be the problem!!
Here is the code I'm using.
$http({
url: domain + "modulesinfo/list",
method: "GET",
//Added after some research // I'm testing on local server
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
})
.success(function(data){
$scope.modules = data.response;
$scope.$apply();
})
.error(function(){
navigator.notification.alert("You are damned", function(){
}, "Not working", "OK");
});
I tried adding header after some research, But that didn't work.