angular-data-grid-new
Version:
Light, flexible and performant Data Grid for AngularJS apps, with built-in sorting, pagination and filtering options, unified API for client-side and server-side data fetching, seamless synchronization with browser address bar and total freedom in mark-
24 lines (20 loc) • 690 B
JavaScript
angular.module('myApp', ['dataGrid', 'pagination', 'ngMaterial'])
.controller('myAppController', ['$scope', 'myAppFactory', function ($scope, myAppFactory) {
$scope.gridOptions = {
data: [],
urlSync: true
};
myAppFactory.getData().then(function (responseData) {
$scope.gridOptions.data = responseData.data;
});
}])
.factory('myAppFactory', function ($http) {
return {
getData: function () {
return $http({
method: 'GET',
url: 'https://angular-data-grid.github.io/demo/data.json'
});
}
}
});