browse other examples

Buffer first, last, length

The ui-scroll Adapter has 3 read-only properties which provide information of current ui-scroll Buffer state. The buffer contains some visible items and some items that are out of visible part of the viewport. So with these properties we can get the topmost and the bottommost items that the ui-scroll is dealing with at the moment. At the template's layer it may look like

<li ui-scroll="item in datasource" adapter="adapter">{{item}}</li>
First buffer {{adapter.bufferFirst}}
Last buffer {{adapter.bufferLast}}
Buffer length: {{adapter.bufferLength}}