@microsoft/fast-element > repeat
repeat() function
A directive that enables list rendering.
Signature:
export declare function repeat<TSource = any, TArray extends ReadonlyArray<any> = ReadonlyArray<any>, TParent = any>(items: Expression<TSource, TArray, TParent> | Binding<TSource, TArray, TParent> | ReadonlyArray<any>, template: Expression<TSource, ViewTemplate<any, TSource>> | Binding<TSource, ViewTemplate<any, TSource>> | ViewTemplate<any, TSource>, options?: RepeatOptions): CaptureType<TSource, TParent>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
items |
Expression<TSource, TArray, TParent> | Binding<TSource, TArray, TParent> | ReadonlyArray<any> |
The array to render. |
|
template |
Expression<TSource, ViewTemplate<any, TSource>> | Binding<TSource, ViewTemplate<any, TSource>> | ViewTemplate<any, TSource> |
The template or a template binding used obtain a template to render for each item in the array. |
|
options |
(Optional) Options used to turn on special repeat features. |
Returns:
CaptureType<TSource, TParent>