Skip to main content

@microsoft/fast-element > repeat

repeat() function

A directive that enables list rendering.

Signature:
export declare function repeat<TSource = any, TItem = any>(itemsBinding: Binding<TSource, readonly TItem[]>, templateOrTemplateBinding: SyntheticViewTemplate | Binding<TSource, SyntheticViewTemplate>, options?: RepeatOptions): CaptureType<TSource>;

Parameters

ParameterTypeDescription
itemsBindingBinding<TSource, readonly TItem[]>The array to render.
templateOrTemplateBindingSyntheticViewTemplate | Binding<TSource, SyntheticViewTemplate>The template or a template binding used obtain a template to render for each item in the array.
optionsRepeatOptionsOptions used to turn on special repeat features.
Returns:

CaptureType<TSource>