Callback to be evaluated (expression to be evaluated) when the current scroll position reaches the bottom.
* If the callback runs an asynchronous method ($http), please make sure to return the promise like so:
$scope.myCallback() = function() {
return $http.get('api/v1/..')
.then(onSuccess)
.catch(onError);
}Failing to do so, unexpected behaviors may occur.
Disable callback from being executed.
Delays the execution of the callback
Scroll allowance for executing the callback when reaching the bottom. This allows you to get the callback executed even before reaching the bottom.
Use the container (element which the directive was applies to) for the infinite scrolling instead of the window. Set true to use the element which the directive is applied to; leave as blank to use the body / $window.
The example below illustrates that myCallback() will be executed when the div is scrolled to the bottom:
<div style="overflow: scroll; height: 500px;" srph-infinite-scroll="myCallback()" container="true">
<ul>
<li> ng-repeat="apple in apples"> {{ apple.name }} </li>
</ul>
</div>