I am using custom pagination control. To initialize the control I am calling gridOptions.api.paginationGetPageSize() and gridOptions.api.paginationGetRowCount(). I tried calling the two api methods on onPaginationChanged and onGridReady, everytime I get the error
Cannot read property 'api' of undefined
Any ideas why. I am using md-paginator (angular material 2 control) for paging.