Questions tagged [ng-grid]

ng-grid is a datagrid written in AngularJS and jQuery by the AngularUI Team. It is a high-performance datagrid which uses virtualization for rendering rows and performs well with large data sets.

ng-grid is a datagrid written in and by the AngularUI Team. It is a high-performant datagrid using virtualization for rendering rows and really shines when you have lots of rows.

The 3.0 branch of ng-grid will be renamed in and will depend on AngularJS only.

Similar libraries:

Basic Setup:

index.html

<html>
<head>
    <link rel="stylesheet" type="text/css" href="../ng-grid.css" /> 
    <script type="text/javascript" src="../lib/angular.js"></script>
    <script type="text/javascript" src="../lib/jquery.min.js"></script>
    <script type="text/javascript" src="../ng-grid.js"></script>
    <script type="text/javascript" src="main.js"></script>
</head>
<body ng-app="MyGridApp" ng-controller="bodyController">
    <div ng-grid="gridOptions">
    </div>
</body>
</html>

main.js:

var app = angular.module('MyGridApp', ['ngGrid']);

app.controller('bodyController', ['$scope', function($scope) {
    $scope.myData = [{name: "Moroni", age: 50},
                     {name: "Tiancum", age: 43},
                     {name: "Jacob", age: 27},
                     {name: "Nephi", age: 29},
                     {name: "Enos", age: 34}];
    $scope.gridOptions = { data : 'myData' };// $scope.myData is also acceptable but will not update properly. OK to use the object if you don't care about updating the data in the grid.
}]);
1068 questions
284
votes
11 answers

Best way to represent a Grid or Table in AngularJS with Bootstrap 3?

I am creating an App with AngularJS and Bootstrap 3. I want to show a table/grid with thousands of rows. What is the best available control for AngularJS & Bootstrap with features like Sorting, Searching, Pagination etc.
194
votes
5 answers

ng-options with simple array init

I'm a little bit confused with Angular and ng-options. I have a simple array and I want to init a select with it. But, I want that options value = label. script.js $scope.options = ['var1', 'var2', 'var3']; html