Skip to main content
Version: 1.x

@microsoft/fast-element > html

html() function

Transforms a template literal string into a renderable ViewTemplate.

Signature:
export declare function html<TSource = any, TParent = any>(strings: TemplateStringsArray, ...values: TemplateValue<TSource, TParent>[]): ViewTemplate<TSource, TParent>;

Parameters

ParameterTypeDescription
stringsTemplateStringsArrayThe string fragments that are interpolated with the values.
valuesTemplateValue<TSource, TParent>[]The values that are interpolated with the string fragments.
Returns:

ViewTemplate<TSource, TParent>

Remarks

The html helper supports interpolation of strings, numbers, binding expressions, other template instances, and Directive instances.