rendfall / test-templates

Demo:

Home Page:http://rendfall.github.io/test-templates/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Templates

Tiny library to generate template with data binding.

Usage

Template:

<div id="content">
    <h1>{{ title }}</h1>
    <img src="{{ link }}" />
    <p>{{ nodef }}</p>
</div>

Render:

var $content = document.getElementById('content');

$content.innerHTML = Template.compile($content.innerHTML, {
    title: 'This is an example',
    link: 'http://fakeimg.pl/250x100/ff0000/'
});

Unit tests

$ npm test

About

Demo:

http://rendfall.github.io/test-templates/demo/


Languages

Language:JavaScript 100.0%