Skip to content

Instantly share code, notes, and snippets.

@sam3k
Created May 21, 2013 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sam3k/5616663 to your computer and use it in GitHub Desktop.
Save sam3k/5616663 to your computer and use it in GitHub Desktop.
var app = angular.module('myApp', ['ngGrid', 'ui.bootstrap']);
app.controller('MyCtrl', function($scope, $window) {
$scope.percentage = 65;
$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',
rowHeight:50,
columnDefs: [
{field:'name', display:'Student Name' },
{
field:'age',
display:'Age',
cellTemplate: '<progress class="progress" value="{{percentage}}"></progress><div ng-class="{green: row.getProperty(col.field) > 30}"><div class="ngCellText">{{row.getProperty(col.field)}}</div></div>'
}
]
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment