Skip to content

Instantly share code, notes, and snippets.

@gigenthomas
Forked from ggoodman/app.js
Last active August 29, 2015 13:57
Show Gist options
  • Save gigenthomas/9479948 to your computer and use it in GitHub Desktop.
Save gigenthomas/9479948 to your computer and use it in GitHub Desktop.
var app = angular.module('plunker', ['ngGrid']);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.fruits = [ 'Apple', 'Orange' ,'Banana'];
$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',
showGroupPanel: true,
jqueryUIDraggable: true
};
});
<!doctype html>
<html ng-app="plunker">
<head>
<meta charset="utf-8">
<title>AngularJS Plunker</title>
<link rel="stylesheet" type="text/css" href="http://angular-ui.github.com/ng-grid/css/ng-grid.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
<script type="text/javascript" src="http://angular-ui.github.com/ng-grid/lib/ng-grid.debug.js"></script>
<link rel="stylesheet" href="style.css">
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
Hello {{name}}!
<div ng-repeat="fruit in fruits">
{{ fruit }}
</div>
<div class="gridStyle" ng-grid="gridOptions"></div>
</body>
</html>
/* Put your css in here */
.gridStyle {
border: 1px solid rgb(212,212,212);
width: 500px;
height: 300px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment