# TemplateFactory Class

Defined in: `js/util/TemplateFactory.js:10`
Module: util
Parent Module: StructureJS

A helper class to provide a convenient and consistent way to render templates.

## Index

Show: Inherited Protected Private Deprecated

### Properties

- HANDLEBARS static
- templateEngine static
- templateNamespace static
- UNDERSCORE static

### Methods

- create static

## Properties

### `HANDLEBARS` String public final static

Defined in `js/util/TemplateFactory.js:88`

A constant value for using Handlebars templates. This is the default template engine.

### `templateEngine` String public static

Defined in `js/util/TemplateFactory.js:98`

Sets the template engine type for this TemplateFactory class. The default is TemplateFactory.HANDLEBARS

Default: TemplateFactory.HANDLEBARS

### `templateNamespace` String public static

Defined in `js/util/TemplateFactory.js:108`

The global namespace for pre-compiled templates.

Default: 'JST'

### `UNDERSCORE` String public final static

Defined in `js/util/TemplateFactory.js:78`

A constant value for using Underscore or Lodash templates.

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

## Methods

### `create`
(

- `templatePath`
- `[data=any]`

)
String public static

Defined in `js/util/TemplateFactory.js:25`

Creates a template.

#### Parameters:

- `templatePath` Any
- `[data=any]` Object optional

#### Returns:

String:

#### Example:

     TemplateFactory.create('templateName', {some: 'data'});

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index