Created
May 21, 2013 00:14
-
-
Save sam3k/5616663 to your computer and use it in GitHub Desktop.
This file contains 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
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