Hill30 / NGScroller

Bidirectional infinite scrolling with dynamic data load
MIT License
69 stars 20 forks source link

Enhancement for evaluation of buffer-size #79

Closed jcstritt closed 9 years ago

jcstritt commented 9 years ago

I propose you to change line 84 of scroll.js from : bufferSize = Math.max(3, +$attr.bufferSize || 10); to bufferSize = Math.max(3, +$scope.$eval($attr.bufferSize) || 10);

so we can give an expression for the buffer-size (per example, if we retrieve this number from an application option) : buffer-size="::ctrl.getNbItemsPerPage()"

tested, ok with AngularJS 1.3.4