Angular ui 网格渲染的回调函数

Callback function for Angular ui-grid rendered

我想知道在呈现 Angularjs 网格后触发的回调函数是什么,这意味着它的所有单元格都呈现了类似 $.ready()

的函数

或许您可以使用 $timeout 来解决您的问题

http://jsfiddle.net/8nuwQ/100/

算出函数是 $scope.gridApi.core.on.rowsRendered()

有两个 functions 可以使用,如果你想在 ui-grid ready 上执行然后使用 renderingComplete

onRegisterApi: function(gridApi) {
    gridApi.core.on.renderingComplete($scope, function() {
        //code to execute
    });
}

如果您需要 callback 数据更改,请使用 rowsRendered

onRegisterApi: function(gridApi) {
    gridApi.core.on.rowsRendered($scope, function() {
        //code to execute
    });
}