- Source:
Methods
-
<static> add(templatePath, templateFn)
-
This function adds a precompiled template into the
cached templatesParameters:
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 variablesParameters:
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 nameParameters:
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 nameParameters:
Name Type Description templatePath
string name of the template
- Source:
Returns:
full URL of the tempalte
- Type
- string