Namespace: template

template

Methods


<static> add(templatePath, templateFn)

This function adds a precompiled template into the
cached templates

Parameters:
Name Type Description
templatePath string

name of the template

templateFn function

function of the precompiled template

Source:

<static> compile(templatePath, options)

This function gets a template by its name and
compiles with the specified variables

Parameters:
Name Type Description
templatePath string

name of the template

options Mx.parameters.TemplateOptions

of the template compilation

Source:
Returns:

the promise with the html resultant

Type
Promise

<static> get(templatePath)

This function gets a template function of Handlebars
by its name

Parameters:
Name Type Description
templatePath string

name of the template

Source:
Returns:

the promise with the handlebars function

Type
Promise

<static> getTemplateUrl_(templatePath)

This function gets the full URL of a template
by its name

Parameters:
Name Type Description
templatePath string

name of the template

Source:
Returns:

full URL of the tempalte

Type
string