javascript - How to display array data in AngularJS using ngGrid? -
i want display following array in nggrid
$scope.pathinfo = ["28.86 gb left on dir1","28.86 gb left on dir2"]
my controller looks this:
$scope.restorepathgridoptions = { data: '$scope.pathinfo', columndefs: [ {field: 'entry', displayname: 'free space paths'} ] }
and html:
<div id="restorepathsgrid" class="gridstyle" ng-grid="restorepathgridoptions">
i assuming 'entry' data value of array @ indices 0 , 1.
but grid not show @ all.
any ideas why?
data: '$scope.pathinfo'
$scope not needed here.
also, if want field entry in example, have use array of objects
Comments
Post a Comment