是否有任何内置方法可用于销毁 ui-grid (angularjs) 并重新加载它。当我使用 ajax 调用重新加载网格数据时,它正在重新加载新数据,但它没有重置当前页码( paginationCurrentPage
)和 paginationPageSizes
最佳答案
您可以使用 uiGridPaginationService 重置当前页面和页面大小。文档是
uiGridPaginationService(grid, currentPage, pageSize)
Raises paginationChanged and calls refresh for client side pagination
Parameters grid – {Grid} – the grid for which the pagination changed currentPage – {int} – requested page number pageSize – {int} – requested page size
关于angularjs - 如何销毁ui网格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30018705/