Ajax call – AngularJS

AngularJS Forms

To read the data from the server AngularJS uses $http control to get the desired results from Ajax. It requires data as a JSON format.

Example of Ajax:

<script>
var ngApp = angular.module("ngApp", []);
ngApp.controller('nameController', function($scope) {
   var url="ajaxmaster.php";
   $http.get(url).success( function(data) {
           $scope.response = data; 
   });
});
</script>

Leave a Reply

Your email address will not be published. Required fields are marked *