ModelView: Fast templates

ModelView is a simple templating system that binds JavaScript to good ol' HTML templates using HTML5.

It was inspired by AngularJS, but has somewhat different design goals. The goal of ModelView is to be as light and fast as possible, and rely on standard APIs to get the job done: it currently does not have any dependencies at runtime.

It allows to bind data to DOM elements, and be able to refresh the DOM when the data changes, and vice versa, either automatically or on demand, or when a certain event is fired.

It provides a few common constructs, like binding values, looping, conditionals, events, and so on. It is also easily extensible, and new constructs can be added fairly quickly with a few lines of code.

Contributions are welcome.


Current features

  • Model bindings
  • Scope and nested scope resolution
  • Common directives: Value, Model, Condition
  • Foreach loops via the Each directive
  • Event bindings directive

Upcoming features

  • Garbage collector
  • Async rendering
  • Event optimisation
  • Model shorthand directives (if, each)
  • Model versioning and change history


Simply install using npm:

$ npm install modelview


You can check the documentation at, and/or check the test cases for examples!


When building from source, use the build script:

$ npm run build

It creates a distribution in the dist/ directory, and documentations in build/docs/.


Contributions are always welcome. If you want to contribute:

  • Fork the project
  • Test your code (see below)
  • Push your code
  • Submit a pull request


Contributions must pass both the tests and styling guidelines. Before submitting a patch, make sure you run:

$ npm run test && npm run validate

About the project

Change log



MIT License: see LICENSE


Francis Lacroix @netcoder1 created ModelView while at OverrideLogic.