@microsoft/fast-element > ViewTemplate
ViewTemplate class
A template capable of creating HTMLView instances or rendering directly to DOM.
Signature:
export declare class ViewTemplate<TSource = any, TParent = any> implements ElementViewTemplate<TSource, TParent>, SyntheticViewTemplate<TSource, TParent>
Implements: ElementViewTemplate<TSource, TParent>, SyntheticViewTemplate<TSource, TParent>
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Creates an instance of ViewTemplate. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Record<string, ViewBehaviorFactory> |
The directives that will be connected to placeholders in the html. | |
|
|
string | HTMLTemplateElement |
The html representing what this template will instantiate, including placeholders for directives. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Creates an HTMLView instance based on this template definition. | ||
|
|
Creates a template based on a set of static strings and dynamic values. | |
|
Returns a directive that can inline the template. | ||
|
Creates an HTMLView from this template, binds it to the source, and then appends it to the host. | ||
|
Sets the DOMPolicy for this template. |