Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Interactive data-driven views, MVVM and MVP, built on top of JsRender templates
JavaScript HTML CSS
Branch: master

Commit 64 (Beta Candidate)


- debugMode is now false by default - which means
  that on error, an exception is thrown, rather than
  outputting an error message in the rendered output.
  To obtain previous behavior, set debugMode to true:

- jQuery UI widgets: There is now a specific syntax for
  setting widget properties. A tag property with an initial
  underscore will correspond to the corresponding property
  of the widget, and it can be set, and optionally data-linked
  {^{datepicker myDate _changeMonth=true ^_maxDate=myEndDate/}}

- The $.views.sub.cvt() no longer exists. Use tag.cvtArgs().


- AMD and CommonJs support for both JsRender and JsViews,
  providing both for NodeJS scenarios, and scenarios in which
  requireJS or similar AMD script loaders are used to load
  JsRender, JsObservable or JsViews.

- Support for JsRender in NodeJS:
  Support for Express and Hapi view engines using JsRender
  Support for loading templates from file, on Node, using
  the syntax: tmpl="@file.path"

- $.templates() now has an equivalent alternate name (alias):
  $.views.compile() which allows for immediate integration in some
  frameworks, such as Hapi templated views.

- Similarly, a compiled template now has an alternative shortcut API
  for the render method. The compiled template is it's own render
  function, so for a compiled template: var tmpl = $.templates(...);
  the following are equivalent:

  tmpl.render(data, helpers);
  tmpl(data, helpers);

- Support for allowCode has been simplified and improved. Docs to
  follow. You can now enable allowCode globally using
  $.views.settings.allowCode. A new tag: {{*: expression}} will
  return the evaluated expression - like {{: expression}} - but here
  the expression can allow any code.

- JsRender now has noConflict support, for loading a new instance of
  JsRender, without conflict with an already loaded instance.

- A new data-link binding: data-link="data-foo{: ...}" permits
  data-linking directly to data-foo properties of HTML elements.

- Tag property names can now include '.' and '_' characters:
  {{myTag _a=3 b.c=4 /}}

- Support for {^{on someMethod ... /}} as a button. For example,
  {^{on someMethod ...}}Go{{/on}} is equivalent to
  <button data-link="{on someMethod ...}">Go</button>

- {^{foo class=...}} lets you set (and optionally bind to) the class
  of the linked HTML element.

- {^{foo id=...}} lets you set (and optionally bind to) the id of the
  linked the HTML element.

- {^{foo name=...}} lets you set (and optionally bind to) the name
  property of the linked HTML element.

- If a custom tag has setSize specified as true: {..., setSize: true, ...}
  then you can set and optionally bind to the with and height properties
  to control the width and height of the linked HTML element:
  {^{foo ... width=55 ^height=expression ...}}

- Support simplified syntax when defining custom tags with just a markup
  string (template), or jsut a render method:
  $.views.tags("myTag", "this is the template");
  $.views.tags("a", function(...){
     //this is the render function

- The debug helpers: {{dbg:}} {{dbg ...}} {{~dbg()}} now throw and catch,
  rather than including a debugger; statement. To use this feature set
  your browser/debugger to stop on caught exceptions.
  (See also BorisMoore/jsrender#239)

- A lot of changes have been made to considerably optimize performance
  when using JsRender to render simple templatesPerf. Optimized template
  will not need to instantiate view objects, and hence will be faster.
  A compiled template has a tmpl.useViews property which shows whether
  it allowed that optimization. (tmpl.useViews false)

- Many improvements on jQuery UI widget integration. Docs and samples
  to come. See also download/sample-tag-controls/jsviews-jqueryui-widgets.js

- The git project now has build support, with Gulp.

- Improved support for data-linking without initial rendering,
  data-link="...^{...}" - which is particularly useful when using
  server-rendered content linked subsequently in browser.

Bug Fixes:

- BorisMoore/jsrender#239:

- BorisMoore/jsrender#252
  (Improved syntax error message e.g.:
  '{{include}} block has {{/for}} with no open {{for}}'

- #300

- #301

- #302

- #303

- #213 (Detection and error message)
latest commit b1a33ac163
@BorisMoore authored

JsViews: Next-generation MVVM and MVP framework - bringing templates to life

The power of MVVM, the flexibility of JavaScript, the speed and ease of JsRender templates

JsViews builds on top of JsRender templates, and adds data-binding and observable data, to provide a fully-fledged MVVM platform for easily creating interactive data-driven single page apps and websites.

JSRender and JsViews together provide the next-generation implementation of both JQuery Templates, and JQuery Data Link - and supersede those libraries.

See also the JsRender repository on GitHub

Documentation and Downloads

Documentation, downloads, samples are available on the website.
(JsViews and JsObservable API docs and tutorials are coming soon, as we move JsViews to the official beta and on to V1.0)


In addition to the demos at, see also the demos folder of this GitHub repository - available here as live samples.

Current Status

JsViews is now an alpha release, which will be declared beta as soon as API documentation is complete on the website, and then move to V1.0.

Something went wrong with that request. Please try again.