1. Question:How to make an ajax call using Angular JS? 

    Answer
    AngularJS provides $http control which works as a service to make ajax call to read data from the server. The server makes a database call to get the desired records. AngularJS needs data in JSON format. Once the data is ready, $http can be used to get the data from server in the following manner:
    function studentController($scope,$http) {
       var url = "data.txt";
       $http.get(url).success( function(response) {
          $scope.students = response; 
       });
    }






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd