I\'m using md-virtual-repeat
directive of Angular Material
to have an infinite scroll, and I need to replace it\'s demo $timeout function with a $h
On every api call try to get wheather the db has few more records or not. and add that condition in fetchMoreItems_ function.
fetchMoreItems_: function (index) {
if (this.toLoad_ < index && hasMoreRecords) {
this.toLoad_ += 5;
In our code we get the details like