Template State Variable Reference

Table of contents


Introduction

Template state variables are Model Object types and contain a template. The state variable value is a template: A Template object, a string, a number, a DOM node, or an array containing a mix of these types. Template state variables are considered changed after each assignment regardless of value. When rendered, they will display the content template.

Template state variables allow another form of dynamic display. The <When> component provides a similar dynamic display, though it is more useful when the output template depends on a few state variables. Template state variables are more appropriate for more complex computations or server-generated content.

Constructor

Syntax

ctl.createPage({
	...,
	stateVarInfo:[
		{type:'template', ...},
	],
})

Parameters


Instance methods

Inherited methods

Note: The component() method returns a TemplateSvCmp.


Instance properties

Inherited properties


Component attributes

Inherited attributes


DOM element