Skip to main content

@microsoft/fast-element > ViewTemplate > (constructor)

ViewTemplate.(constructor)

Creates an instance of ViewTemplate.

Signature:
constructor(html: string | HTMLTemplateElement, directives: ReadonlyArray<HTMLDirective>);

Parameters

ParameterTypeDescription
htmlstring | HTMLTemplateElementThe html representing what this template will instantiate, including placeholders for directives.
directivesReadonlyArray<HTMLDirective>The directives that will be connected to placeholders in the html.