Last active
August 29, 2015 14:01
-
-
Save josebalius/e5abdd053ec25b067d94 to your computer and use it in GitHub Desktop.
ngReactGrid - Basic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app="example"> | |
| <head> | |
| <title>ngReactGrid Basic Example</title> | |
| <link rel="stylesheet" type="text/css" href="css/ngReactGrid.css"> | |
| </head> | |
| <body> | |
| <div ng-controller="BasicExampleController" style="width: 100%"> | |
| <ng-react-grid grid="grid"></ng-react-grid> | |
| </div> | |
| <!-- Your JS Sources --> | |
| <script src="js/angular.min.js" type="text/javascript" ></script> | |
| <script src="js/react-0.10.0.js" type="text/javascript" ></script> | |
| <script src="js/ngReactGrid.min.js" type="text/javascript" ></script> | |
| <script type="text/javascript"> | |
| angular.module("example", ['ngReactGrid']) | |
| .controller("BasicExampleController", function($scope) { | |
| var employees = []; | |
| for(var i = 0; i < 49; i++) | |
| employees.push({ | |
| firstName: "John " + i, | |
| lastName: "Doe " + i | |
| }); | |
| $scope.grid = { | |
| data: employees, | |
| columnDefs: [ | |
| { | |
| field: "firstName", | |
| displayName: "First Name" | |
| }, | |
| { | |
| field: "lastName", | |
| displayName: "Last Name" | |
| }] | |
| }; | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment