OnsLazyRepeat Directive ([ons-lazy-repeat])

Angular directive for <ons-lazy-repeat> component.

Using this component a list with millions of items can be rendered without a drop in performance. It does that by “lazily” loading elements into the DOM when they come into view and removing items from the DOM when they are not visible.


Tutorial will be added soon.

See also

Name Description
delegate Specify a delegate object to load and unload item elements.

This function should return a HTMLElement. To help rendering the element, the current index and a template is supplied as arguments. The template is the initial content of the <ons-lazy-repeat> element.

delegate.countItems Should return the number of items in the list.

Should return the height of an item. The index is provided as an argument. This is important when rendering lists where the items have different height. The function is optional and if it isn’t present the height of the first item will be automatically calculated and used for all other items.


This function is used called when an item is removed from the DOM. The index and DOM element is provided as arguments. The function is optional but may be important in order to avoid memory leaks.

delegate.configureItemScope Function which recieves an index and the scope for the item. Can be used to configure values in the item scope.
Signature Description
refresh() Refresh the list. Use this method when the data has changed.

Refresh the list. Use this method when the data has changed.


Name Type Description
onsLazyRepeat Render infinite lists with “let of” syntax in Angular.

Need Help?

If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.

For bug reports and feature requests use our GitHub Issues page.