---
id: fast-element.viewtemplate._constructor_
title: ViewTemplate.(constructor)
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [ViewTemplate](./fast-element.viewtemplate.md) &gt; [(constructor)](./fast-element.viewtemplate._constructor_.md)

## ViewTemplate.(constructor)

Creates an instance of ViewTemplate.

<b>Signature:</b>

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  html | string \| HTMLTemplateElement | The html representing what this template will instantiate, including placeholders for directives. |
|  directives | ReadonlyArray&lt;[HTMLDirective](./fast-element.htmldirective.md)<!-- -->&gt; | The directives that will be connected to placeholders in the html. |
