funcunit
Version:
<!-- @hide title
30 lines (18 loc) • 916 B
Markdown
{Attribute} can/view/autorender.can-autorender can-autorender
can.view.plugins
Mark a script or other element as a template that should be
rendered automatically.
`<script can-autorender type='text/TYPE'>CONTENT< /script>`
Renders the content of the script tag with a specified content.
{String} TYPE The template engine type. It should be one
of `ejs`, `mustache` and `stache`.
{String} CONTENT The content to be rendered.
`<TAG can-autorender type='text/TYPE'>CONTENT</TAG>`
Renders the contents of the element as a template and replaces the
original contents. Note: This does not currently work perfectly with
any current templating engine. However, this will likely change.
{String} TYPE The template engine type. It should be one
of `ejs`, `mustache` and `stache`.
## Use
Read more about using this tag on [can/view/autorender].