Angularjs Http Get Method

Angularjs Http Get Method : AngularJs Http Get is used to perform get request. The $http is basically core angular service that provides communication with remote HTTP services via the XMLhttpRequest object or via JSONP. You can use this method to communicate with sever using the get method. We are going to cover this method with example and demo.

Angularjs Http Get Method Syntax

Here is syntax of Http get method –


Url : Thet Url from where you want to load data.
Callback : Callback function after success. Returns object.

Angularjs Http Get Method Sample Data

Sample data for http get method is given below which is used in get method example.


Below is example of Http Get method which reads data in JSON format from the url : You can use your server path which will return data in JSON format. Run the below example to see output.


<!DOCTYPE html>
<html lang="en">
    <script src="//"></script>

<div ng-app="userApp" ng-controller ="userController">
    <table id="searchResults">
    <tr ng-repeat="data in usersData">

var app = angular.module('userApp', []);
app.controller('userController', function($scope, $http) {
    .success(function(response) {$scope.usersData = response.users;});


Try it »

If you run the above example it will produce output like this-

Angularjs Http Get Method

Angularjs Http Get Method

Try Video Demo – All In One Video for this method –

AngularJs Http Get Method Video Demo –


Add Comment

📖 Read More