@absolunet/ioc2.1.0

View on GitHub

JsRenderDriver

JSRender view engine driver.

Extends

Members

(static) dependencies :Array.<string>

Source:
Class dependencies: ['app'].

engine :*

Source:
Inherited From:
Current engine accessor.

Methods

createCustomHelpers()

Source:
Create custom JSRender helper functions.

createInjectHelper()

Source:
Create "inject" helper function.

createConfigHelper()

Source:
Create "config" helper function.

createRouteHelper()

Source:
Create "route" helper function.

createTranslateHelper()

Source:
Create "t" helper function.

createDumpHelper()

Source:
Create "dump" helper function.

createCustomTags()

Source:
Create all JSRender custom tags.

createIncludeTag()

Source:
Create "include" tag. JSRender already defines this tag, but an overwrite is necessary in order to use the view resolver.

make(view)

Source:
Overrides:
Create a template instance.
Parameters:
Name Type Description
view string The view name.
Returns:
The template instance.
Type
template

render(view, data)

Source:
Overrides:
Render a template with the given data.
Parameters:
Name Type Description
view string The view name.
data * The view-model data.
Returns:
The rendered template as string.
Type
string

setEngine(engine)

Source:
Inherited From:
Set current engine.
Parameters:
Name Type Description
engine * The engine instance.
Returns:
The current instance.
Type
support.mixins.HasEngine