Skip to main content

WidgetTemplate

Namespace: Wisej.Web.Ext.Ignite

Assembly: Wisej.Web.Ext.Ignite (4.1.0.0)

Represents an Ignite template.

public class WidgetTemplate

Templates in the Ignite library are either plain global JavaScript functions, or HTML snippets using their template syntax.

Each template assigned to WidgetTemplates is added to the page as a script element with the specified Id and Type.

Constructors​

Instance member WidgetTemplate()​

Initializes a new instance of WidgetTemplate.

Properties​

Instance member Id​

String: Returns or sets the identifier of the WidgetTemplate. (Default: "")

The identifier is used as the id of the script element that contains the template in the browser. It must be unique in the page: a template is not registered when an element with the same id already exists.

Instance member Template​

String: Returns or sets the content of the WidgetTemplate. (Default: "")

Example:

The following example defines an HTML template that uses the Ignite UI template syntax to refer to the fields of the data item.

var template = new igBase.WidgetTemplate
{
Id = "productItemTemplate",
Template = "<b>${Name}</b> (${Category})"
};

Instance member Type​

String: Returns or sets the type of the template. Use "text/x-jquery-tmpl" for HTML templates. (Default: "text/x-jquery-tmpl")

The value is used as the type attribute of the script element that contains the template. The default is "text/x-jquery-tmpl".