bindling

2.0.0 • Public • Published

bindling Build Status npm version

Declarative View-Model-Binding for HTML

Installation

npm install bindling --save

Usage

var bindling = require('bindling');
var template = require('./template.html');
 
var model = {
  name: 'Enter your name',
  update: function(value) {
    this.name = value;
  }
};
 
var element = bindling(template, model);
 
document.querySelector('body').appendChild(element);

template.html

<section>
  <input type="text" on-input="update(this.value)"><span>{name}</span>
</section>

Readme

Keywords

none

Package Sidebar

Install

npm i bindling

Weekly Downloads

0

Version

2.0.0

License

none

Last publish

Collaborators

  • bealearts