| Index: src/site/docs/tutorials/add-elements/examples/todo/todo.dart
|
| diff --git a/src/site/docs/tutorials/add-elements/examples/todo/todo.dart b/src/site/docs/tutorials/add-elements/examples/todo/todo.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5698508ecc7ae54b1404d025b19940d6c0960936
|
| --- /dev/null
|
| +++ b/src/site/docs/tutorials/add-elements/examples/todo/todo.dart
|
| @@ -0,0 +1,17 @@
|
| +import 'dart:html';
|
| +
|
| +InputElement toDoInput;
|
| +UListElement toDoList;
|
| +
|
| +void main() {
|
| + toDoInput = query('#to-do-input');
|
| + toDoList = query('#to-do-list');
|
| + toDoInput.onChange.listen(addToDoItem);
|
| +}
|
| +
|
| +void addToDoItem(Event e) {
|
| + var newToDo = new LIElement();
|
| + newToDo.text = toDoInput.value;
|
| + toDoInput.value = '';
|
| + toDoList.children.add(newToDo);
|
| +}
|
|
|