我最近遇到了同样的问题,并在https://groups.google.com/forum/#!topic/angular/KiBXP3eKCDY找到了解决方案
您想要
ng-grid在拥有数据之后进行初始化。
以下解决方案需要使用angular-ui:
<div ui-if="dataForGrid.length>0" ng-grid="gridOptions" ng- />$scope.getTableStyle= function() { var rowHeight=30; var headerHeight=45; return { height: ($scope.dataForGrid.length * rowHeight + headerHeight) + "px" };};
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)