ng-grid forkable fiddle

Starting point for ng-grid fiddles with jquery and bootstrap

by c0bra

HTML

<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
<script src="http://angular-ui.github.com/ng-grid/lib/ng-grid.debug.js"></script>
<body ng-app="" ng-controller="MyCtrl">
    <div id="myGrid" class="gridStyle" ng-grid="gridOptions"></div>
</body>

CSS

/*style.css*/
.gridStyle {
    border: 1px solid rgb(212,212,212);
    width: 400px; 
    height: 400px;
}

.gridResized {
  width: 600px;
}

JavaScript

// main.js
var app = angular.module('myApp', ['ngGrid']);
app.controller('MyCtrl', function($scope) {
  $scope.myData = [{id: '1', name: "Moroni-2", age: 50},
                   {id: '2', name: "Tiancum", age: 43},
                   {id: '3', name: "Jacob", age: 27},
                   {id: '4', name: "Nephi", age: 29},
                   {id: '5', name: "Enos", age: 34}];
  
  $scope.mySelections = [];
  
  $scope.gridOptions = {
    data: 'myData',
    primaryKey: 'id',
    selectedItems: $scope.mySelections
  };
});