I use IONIC framework for android application development and use ASP.NET WEB API as Service. When i use ripple emulator it's work fine. but when i use actual device it's show error as
"Failed to load resource"
This is function my factory
serviceInstance.search = function (keyword) {
return $http.get(constant.baseUrl + "MyData/GetData?keyword=" + keyword);
}
and I call service from controller like this.
$scope.search = function (keyword) {
dataService.search(keyword).success(function (response) {
$scope.datalist = response;
}).error(function(response){
alert(response);
console.log(response);
});
};