Skip to main content

@microsoft/fast-element > HTMLDirective

HTMLDirective class

Instructs the template engine to apply behavior to a node.

Signature:
export declare abstract class HTMLDirective implements NodeBehaviorFactory 

Properties

PropertyModifiersTypeDescription
targetIndexnumberThe index of the DOM node to which the created behavior will apply.

Methods

MethodModifiersDescription
createBehavior(target)Creates a behavior for the provided target node.
createPlaceholder(index)Creates a placeholder string based on the directive's index within the template.