| OLD | NEW |
| (Empty) |
| 1 <link rel="import" href="../lib-elements/polymer-selector.html"> | |
| 2 <link rel="import" href="../lib-elements/simple_router.html"> | |
| 3 <link rel="import" href="td_input.html"> | |
| 4 <link rel="import" href="td_item.html"> | |
| 5 | |
| 6 <polymer-element name="td-todos"> | |
| 7 <template> | |
| 8 <link rel="stylesheet" href="td_todos.css"> | |
| 9 <simple-router on-route="{{routeAction}}"></simple-router> | |
| 10 <section id="todoapp"> | |
| 11 <header id="header"> | |
| 12 <input is="td-input" id="new-todo" placeholder="What needs to be done?" | |
| 13 autofocus on-td-input-commit="{{addTodoAction}}" | |
| 14 on-td-input-cancel="{{cancelAddTodoAction}}"> | |
| 15 </header> | |
| 16 <section id="main" hidden?="{{model.items.length == 0}}"> | |
| 17 <input id="toggle-all" type="checkbox" | |
| 18 on-change="{{toggleAllCompletedAction}}" | |
| 19 checked="{{model.allCompleted}}"> | |
| 20 <label for="toggle-all">Mark all as complete</label> | |
| 21 <ul id="todo-list" on-td-item-changed="{{itemChangedAction}}" | |
| 22 on-td-destroy-item="{{destroyItemAction}}"> | |
| 23 <template repeat="{{model.filtered}}"> | |
| 24 <li is="td-item" item="{{}}"></li> | |
| 25 </template> | |
| 26 </ul> | |
| 27 </section> | |
| 28 <footer id="footer" hidden?="{{model.items.length == 0}}"> | |
| 29 <span id="todo-count"><strong>{{model.activeCount}}</strong> | |
| 30 {{model.activeItemWord}} left</span> | |
| 31 <polymer-selector id="filters" selected="{{activeRoute}}"> | |
| 32 <li label="all"> | |
| 33 <a href="{{baseUri}}#/">All</a> | |
| 34 </li> | |
| 35 <li label="active"> | |
| 36 <a href="{{baseUri}}#/active">Active</a> | |
| 37 </li> | |
| 38 <li label="completed"> | |
| 39 <a href="{{baseUri}}#/completed">Completed</a> | |
| 40 </li> | |
| 41 </polymer-selector> | |
| 42 <button hidden?="{{model.completedCount == 0}}" id="clear-completed" | |
| 43 on-click="{{clearCompletedAction}}">Clear completed | |
| 44 ({{model.completedCount}})</button> | |
| 45 </footer> | |
| 46 </section> | |
| 47 </template> | |
| 48 | |
| 49 <script type="application/dart" src="td_todos.dart"></script> | |
| 50 | |
| 51 </polymer-element> | |
| OLD | NEW |