@microsoft/fast-element > RepeatDirective

RepeatDirective class

A directive that configures list rendering.

Signature:

export declare class RepeatDirective<TSource = any> implements HTMLDirective, ViewBehaviorFactory, BindingDirective 

Implements: HTMLDirective, ViewBehaviorFactory, BindingDirective

Constructors

Constructor

Modifiers

Description

(constructor)(dataBinding, templateBinding, options)

Creates an instance of RepeatDirective.

Properties

Property

Modifiers

Type

Description

dataBinding

readonly

Binding<TSource>

options

readonly

RepeatOptions

targetNodeId

string

The structural id of the DOM node to which the created behavior will apply.

templateBinding

readonly

Binding<TSource, SyntheticViewTemplate>

Methods

Method

Modifiers

Description

createBehavior()

Creates a behavior for the provided target node.

createHTML(add)

Creates a placeholder string based on the directive's index within the template.