Trying to use, without success, infinite scrolling feature of ui-grid.
Both 3.0.0-v16 and current unstable script version (released 2 days ago) were used. I'm following the example of http://ui-grid.info/docs/#/tutorial/212_infinite_scroll .
When ui-grid calls $scope.gridOptions.onRegisterApi(gridApi)
method, the injected gridApi
object does not have a infiniteScroll
member.
Indeed, the following line
gridApi.infiniteScroll.on.needLoadMoreData($scope, function () {...});
raises
TypeError: Cannot read property 'on' of undefined
at Object.$scope.gridOptions.onRegisterApi (http://...my-ctrl.js:144:35)
at Grid.renderingComplete (http://ui-grid.info/release/ui-grid-unstable.js:4791:20)
Do you know what's wrong?
Not really an answer! I just use this for better code formating.
Did you write the html like this:
<div ui-grid="gridOptions" class="grid" ui-grid-infinite-scroll></div>
and did you inject the feature in your app?
var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.infiniteScroll']);
Please remember that ui-grid is in development and those clever guys are working hard and have issues with keeping the documentation up to date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With