Virtual Scroll for AngularJS ngRepeat directive
npm install angular-vs-repeatangular-vs-repeat v2.0.9
=================
Looking for a version for Angular 2?
===
Check out https://github.com/kamilkp/ng2-vs-for
---
vs-repeat attributevs-repeat-container)top updating directives - even better performance  
Virtual Scroll for AngularJS ngRepeat directive
Demo: http://kamilkp.github.io/angular-vs-repeat/
You can find the source code for this demo on branch "gh-pages".
Changelog: https://github.com/kamilkp/angular-vs-repeat/blob/master/CHANGELOG.md
vsRepeat directive stands for Virtual Scroll Repeat. It turns a standard ngRepeated set of elements in a scrollable containerclientHeight/clientWidth.ngRepeatvs-repeat as a module dependency in your app.``html`
or:
`html`
You can also measure the single element's height/width (including all paddings and margins), and then speficy it as a value
of the options' size property. This can be used if one wants to override the automatically computed element size.
example:
`html`
- the vsRepeat directive must be applied to a direct parent of an element with ngRepeat
- the library also supports ng-repeat-start/ng-repeat-end syntax
- the value of vsRepeat attribute is the single element's height/width measured in pixels. If none provided, the directive will compute it automatically
Options shall be passed as an object to the vs-repeat attribute e.g.:
`html`
Available options:
- horizontal - boolean; stack repeated elements horizontally instead of vertically (defaults to false)offset-before
- - top/left offset in pixels (defaults to 0)offset-after
- - bottom/right offset in pixels (defaults to 0)scroll-margin
- - how many pixels ahead should elements be rendered while scrolling (defaults to 0)latch
- - if true, elements will be rendered gradually but won't be removed when scrolled away (defaults to false)
- size - an angular expression evaluating to the element's size (in pixels) - it is possible to use the ngRepeat's local repeaing variable in this expressionautoresize
- - use this attribute without vs-size and without specifying element's size. The automatically computed element style willscrolled-to-end
readjust upon window resize if the size is dependable on the viewport size
- - callback will be called when the last item of the list is renderedscrolled-to-end-offset
- - set this number to trigger the scrolledToEnd callback n items before the last gets renderedscrolled-to-beginning
- - callback will be called when the first item of the list is renderedscrolled-to-beginning-offset
- - set this number to trigger the scrolledToBeginning callback n items before the first gets rendered
- an event the directive listens for to manually trigger reinitialization
- vsRepeatResize - an event the directive listens for to manually trigger the autosizing algorithm
- vsRepeatReinitialized - an event the directive emits upon reinitialization done; the listener may accepts three arguments: event, startIndex and endIndex`