Template Engines Supported
Client Side Templatates and the
ClientBlockRepeater use the native knockout client side template engines, however they supports also the jQuery template engines whose js file is included in the binary distribution of the Mvc Controls Toolkit,
and the Underscore template engine that can be downloaded
here. All client side control flow statements (_foreach, _if, _ifnot, and _with) always use the knockout native template engine.
Normally the default template engine used by all client side bindings and helpers is the native knockout engine, that allow just the use of knockout bindings in the templates, and doesn't allow any string substitution. Normally this is enough for most of
and the relative template engine will be automatically used as default template engine. If you include a reference to both the jQuery and the Underscore template engines, the Underscore template engine will be taken as default engine.
In order to use a template engine that is different from the default engine in a specific statement you can pass one of the strings below as value of the optional
- jqueryTmplTemplateEngineExt, to select the jQuery Template Engine.
- underscoreTemplateEngineExt to select the Underscore template engine
- nativeTemplateEngine to select the native template engine