Angular UI-网格有多少行可见?

Angular UI-grid how many rows are visible?

在 Angular UI-Grid 中,有什么方法可以告诉我有多少行在我的网格中可见?例如,如果我有 5,000 行,然后过滤,剩下 2,500 行,有没有办法通过 gridApi?

检查

你有你尝试过的例子吗?如果您还没有合并页脚元素,请从这里开始。

http://ui-grid.info/docs/#/tutorial/105_footer

$scope.gridOptions = {
    showGridFooter: true,
    showColumnFooter: true,
    enableFiltering: true,
    columnDefs: [
        { field: 'name', width: '13%' },
        { name: 'registered', field: 'registered', width: '20%', cellFilter: 'date', footerCellFilter: 'date', aggregationType: uiGridConstants.aggregationTypes.max }
    ],
    data: data,
    onRegisterApi: function(gridApi) {
        $scope.gridApi = gridApi;
    }
};

$scope.toggleFooter = function() {
    $scope.gridOptions.showGridFooter = !$scope.gridOptions.showGridFooter;
    $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
};

您甚至可以为每列创建页脚以聚合现有的任何数据。