retrieving SharePoint list items by REST with
var app = angular.module('myApp', ['ngGrid']);
app.controller('MyCtrl', function ($scope, $http) {
$http.get('http://whereever/_api/web/lists/getByTitle("Tasks")/items').success(function (data) {
$scope.items = data;
});
$scope.gridOptions = {
data: 'items',
columnDefs: [
{ field: 'Title', displayName: 'Title' },
{ field: 'Status', displayName: 'Status' }
]
};
});
the ng-grid on
<div ng-controller="MyCtrl">
<div class="gridStyle" ng-grid="gridOptions"></div>
</div>
just shows nothing. A simple json example like http://plnkr.co/edit/UndbtO?p=preview works. Is there any example showing me how to use a REST call on a SharePoint list and passing data to ng-grid?