Skip to content
This repository

Interactive data-driven views, MVVM and MVP, built on top of JsRender templates

branch: master

Commit 54 (Beta Candidate)

Note that this update brings important perf optimizations and many
significant feature improvements, with corresponding changes to the
For normal usage patterns these do not correspond to breaking changes.
However there could possibly be breaking changes on a few advanced
If appropriate, please file issues if breaking changes are
observed. See also the samples and unit tests for changes that take
advantage of new features below.

New features and improvements

- Many major performance improvements, including much improved
  performance for {{>...}} - and optimizations allowing extremely
  fast rendering for render() in the case of simple templates.

- Support for overriding error messages.
  $.views.settings({onError: function(...) {...}});
  (See unit tests. Examples to follow.)

- BREAKING: {{:expression noError=true}} is no longer supported.
  Replaced by more powerful and extensible 'onError' feature below.
  (onError=null or onError='' replaces previous noError=true)

- New 'onError' feature: fallback strings or onError handlers for
  any tag instance: e.g. {{:missing.object onError='fallbackString'}}
  or {{myTag onError=myErrorHandler/}}.
  (See unit tests. Examples to follow.)

- Error messages are now HTML encoded when rendered into HTML by
  a .link() call.

- support for binding to tag properties and contextual properties:
  e.g {{xxx ^foo=expr1 ^~bar=expr2}} allowing then to bind to
  or ~bar. (See unit tests. Examples to follow.)

- tagCtx.params now provides stuctured information about props and
  args - parameter string for each

- $.views.sub.parse(parameterExpression) converts any parameter
  expression to corresponding code.
  Include bindingsArray:
  $.views.sub.parse(parameterExpression, bindingArray) to obtain
  list of path expressions for dependencies

- views now have a boolean 'linked' property with value 'true' if
  created via link() rather than via render()

- Custom tags: Having an empty template: "" in tag definition is
  now supported.

- New support for observably removing a property from an object:

- Many improvements to feature for attaching event handlers using
  data-link="{on ... myHandler}".
  (See unit tests. Examples to follow)

- jsonview fix to support rendering non-string values

Bug fixes:
  - Fix for collision with tags which add props() jQuery method:
latest commit 5f815bc76c
Boris Moore 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.