AngularJS GET Data in Ajax example using $http

AngularJS GET Data in Ajax example using $http

In this Post We Will Explain About is AngularJS GET Data in Ajax example using $http With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Angularjs – Angular get JSON data with ajax Example

In this post we will show you Best way to implement angularjs get data from file, hear for AngularJS Http Post Method ($ with Parameters with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Free Live Chat for Any Issue

AngularJS AJAX Syntex

function studentCtrl($scope,$http) {  
r url = "student.txt";  
 $http.get(url).success( function(results) {  
    $scope.students = results;   

External Include file

AngularJS is a simple JavaScript framework Include one type of the (library) based on a very user friedly popular software mvc based architecture menas called the MVC.

Read Also:  Transparent black color and Opacity Color Codes

   <script src=""></script>


The Angular simple directives and the User’s view HTML DOM in a web-application page form the HTML view. In our example(, the simple HTML view comprises the HTML All the element, and then simple two angular directives Like as a namely angular ng-app as well as agular ng-controller

      <h2>AJAX - AngularJS Sample Application step by step</h2>  
      <div ng-app = "" ng-controller = "studentCtrl">  
               <th>Student Name</th>  
               <th>Student Age</th>  
               <th>Student Std</th>  
            <tr ng-repeat = "stud in students">  
               <td>{{ stud.Name }}</td>  
               <td>{{ stud.Age }}</td>  
               <td>{{ stud.Std }}</td>  


The simple angular controller works as a all the data of the mediator between HTML views and models.

   function studentCtrl($scope,$http) {  
            var url = "student.txt";  
            $http.get(url).success( function(results) {  
               $scope.students = results;  


     table, th , td {  
            border: 1px solid grey;  
            border-collapse: collapse;  
            padding: 6px;  
         table tr:nth-child(odd) {  
            background-color: #a2a2ac;  
         table tr:nth-child(even) {  
            background-color: #3d3d3d;  

“student.txt” (stud’s data in JSON format)

Here the file data some student.txt contains all the stud’s record.

Read Also:  Snowflake Tutorial For Beginners

   "Name" : "jaydeep Gondaliya",  
   "Age" : 25,  
   "Std" : "MCA"  
   "Name" : "Ankit kathiriya",  
   "Age" : 20,  
   "Std" : "BCA"  
   "Name" : "krunal sisodiya",  
   "Age" : 45,  
   "Std" : "12"  
   "Name" : "mayur dhameliya",  
   "Age" : 21,  
   "Std" : "11"  

Angular HTTP Service Methods

  • .delete()
  • .get()
  • .head()
  • .jsonp()
  • .patch()
  • .post()
  • .put()

AngularJS Ajax

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example



I hope you have Got What is AngularJS Ajax example using $http And how it works.I would Like to have FeedBack From My Blog( readers.Your Valuable FeedBack,Any Question,or any Comments about This Article( Are Most Always Welcome.