Get data from SharePoint Online list using Rest api & Angular JS


In this article you can see how to bind data from list using Rest API and Angular JS.
We are having a list with name "InfoList”, in the page we added the script editor and added the below code.
What is difference between AngularJS and Angular 2
table, td, th {
    border: 1px solid blue;

th {
    background-color: Green;
    color: white;
<script type="text/javascript"  src=""></script>
<script type="text/javascript" src=""></script>
    var myAngApp = angular.module('SharePointAngApp', []);

    myAngApp.controller('spCustomerController', function ($scope, $http) {
            method: 'GET',
            url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('InfoList')/items?$select=Title,Employee,Company",
            headers: { "Accept": "application/json;odata=verbose" }
        }).success(function (data, status, headers, config) {
            $scope.customers = data.d.results;
        }).error(function (data, status, headers, config) {


<h1> Angular JS SharePoint REST API !!</h1>

<div ng-app="SharePointAngApp" class="row">
    <div ng-controller="spCustomerController" class="span10">
        <table class="table table-condensed table-hover">
            <tr ng-repeat="customer in customers">



Lakshmi Tulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment


Post a Comment