This feature was added in beta.8 so you need to update.
on-infinite-scroll="nextItems"
should work for Vanilla JS and ng-infinite-scroll="nextItems"
for AngularJS. Notice that I removed ()
.
You can also set myPage.onInfiniteScroll
property to whatever function you want.
Example: http://codepen.io/frankdiox/pen/GZEyjR , http://codepen.io/IliaSky/pen/wGqRRz
UPDATE:
There was actually a bug in this feature that has been fixed already in beta.9.
Correct usage of infinite scroll in Vanilla JS is like this:
<ons-page on-infinite-scroll="myHandler"> ... </ons-page>
var myHandler = function(done) {
console.log('do something');
done();
}
In Angular 1 (same scope):
<ons-page ng-infinite-scroll="myHandler"> ... </ons-page>
$scope.myHandler = function(done) {
console.log('do something');
done();
}