Skip to content

zhoukekestar/template-vd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

template-vd

A template webcomponets based on virtual dom.

Here is a online demo.

How to dev

  • npm install watchify -g
  • cd src && watchify index.es -o index.js
  • serve .
  • Go http://localhost/demo.html

Quick Start

<!-- import -->
<link rel="import" href="./template-vd/index.html">

<!-- tempate -->
<template-vd id='vd'>
  <ul><li repeat='item, index in items'>{{index}} : <b>{{item}}</b></li></ul>
</template-vd>

<!-- set data -->
<script>
  vd.data = {
    items: ["a", "b", "c"]
  }
</script>