API Reference

md-virtual-repeat specifies an element to repeat using virtual scrolling.

Virtual repeat is a limited substitute for ng-repeat that renders only enough dom nodes to fill the container and recycling them as the user scrolls. Arrays, but not objects are supported for iteration. Track by, as alias, and (key, value) syntax are not supported.

Usage

Hello {{i}}!
Hello {{i}}!

Attributes

Parameter Type Description
md-item-size number number

The height or width of the repeated elements (which must be identical for each element). Optional. Will attempt to read the size from the dom if missing, but still assumes that all repeated nodes have same height or width.

md-extra-name string string

Evaluates to an additional name to which the current iterated item can be assigned on the repeated scope. (Needed for use in md-autocomplete).

md-on-demand boolean boolean

When present, treats the md-virtual-repeat argument as an object that can fetch rows rather than an array. NOTE: This object must implement the following interface with two (2) methods: getItemAtIndex: function(index) -> item at that index or null if it is not yet loaded (It should start downloading the item in that case). getLength: function() -> number The data legnth to which the repeater container should be sized. Ideally, when the count is known, this method should return it. Otherwise, return a higher number than the currently loaded items to produce an infinite-scroll behavior.