hi friends i am creating i app i want to get data from a url like : www.example.com/get_data.php but i not able to get it.Please tell me i am fresher in ionic…thanks you
This is not an ionic question, it’s only plain AngularJS, learn about writing a service using $http, your PHP must return JSON data.
thanks sir for replying… php retruning json data here is my code
.controller(‘SearchController’,[’$scope’,’$http’, function($scope,$http){
$http.get('http://i*********/get_data.php').success(function(data){
$scope.search = data;
});
}]);
if i give local file path like (js/data.json) then its working
read this REST API call example can help you - http://www.codeandyou.com/2014/11/how-to-call-rest-api-in-angularjs.html