Lite and Powerfull
No jquery required, only 2kB!
No jquery required, only 2kB!
<template>
<div>
<ol>
<li each="todo in this.todos">
<em>${todo}</em>
</li>
</ol>
<input
type="text"
value="${''}"
change.bind="this.desc"/>
</div>
</template>
export class TodoList{
constructor(){
this.todos = ['do a test'];
}
set desc(desc){
if(desc && desc.trim()){
this.todos.push(desc);
}
}
}