Skip to main content

Posts

Showing posts from April, 2016

Get All Lists with REST API and AngularJS

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script> 
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script> 

<script> 
        var myAngApp = angular.module('SPAngGetLists', []); 
        myAngApp.controller('SPAngGetListsController', function ($scope, $http) { 
            $http({ 
                method: 'GET', 
                url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/Lists?$orderby=Title", 
                headers: { "Accept": "application/json;odata=verbose" } 
            }).success(function (data, status, headers, config) { 
                $scope.customers = data.d.results; 
            }).error(function (data, status, headers, config) { 

            }); 
        }); 
</script> 


<div ng-app="SPAngGetLists"> 
    <div ng-controller="SPAngGetListsController"…