Register a templating language.
can.view.register(info)
Parameters
-
info
{Object}
Information about the templating language.
-
plugin
{String}
The location of the templating language's plugin.
-
suffix
{String}
Files with this suffix will use this templating language's plugin by default.
-
renderer
{function()}
A function that returns a function that, given data, will render the template with that data.
The renderer function receives the id of the template and the text of the template.
-
script
{function()}
A function that returns the string form of the processed template.
Registers a template engine to be used with view helpers and compression.
Example