@microsoft/fast-element > RenderDirective

RenderDirective class

A Directive that enables use of the RenderBehavior.

Signature:

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

Implements: HTMLDirective, ViewBehaviorFactory, BindingDirective

Constructors

Constructor

Modifiers

Description

(constructor)(dataBinding, templateBinding, templateBindingDependsOnData)

Creates an instance of RenderDirective.

Properties

Property

Modifiers

Type

Description

dataBinding

readonly

Binding<TSource>

targetNodeId

string

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

templateBinding

readonly

Binding<TSource, ContentTemplate>

templateBindingDependsOnData

readonly

boolean

Methods

Method

Modifiers

Description

createBehavior()

Creates a behavior.

createHTML(add)

Creates HTML to be used within a template.