| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| 3 for details. All rights reserved. Use of this source code is governed by a | |
| 4 BSD-style license that can be found in the LICENSE file. | |
| 5 --> | |
| 6 <link rel="import" href="router_options.html"> | |
| 7 <link rel="import" href="todo_row.html"> | |
| 8 <polymer-element name="todo-app"> | |
| 9 <template> | |
| 10 <section id="todoapp"> | |
| 11 <header id="header"> | |
| 12 <h1 class='title'>todos</h1> | |
| 13 <form on-submit="{{addTodo}}"> | |
| 14 <input id="new-todo" placeholder="What needs to be done?" autofocus | |
| 15 on-change="{{addTodo}}"> | |
| 16 </form> | |
| 17 </header> | |
| 18 <section id="main"> | |
| 19 <input id="toggle-all" type="checkbox" checked="{{app.allChecked}}"> | |
| 20 <label for="toggle-all"></label> | |
| 21 <ul id="todo-list"> | |
| 22 <template repeat="{{app.visibleTodos}}"> | |
| 23 <li is="todo-row" todo="{{}}"></li> | |
| 24 </template> | |
| 25 </ul> | |
| 26 </section> | |
| 27 <template if="{{app.todos.length > 0}}"> | |
| 28 <footer id="footer"> | |
| 29 <span id="todo-count"><strong>{{app.remaining}}</strong></span> | |
| 30 <ul is="router-options" id="filters"> | |
| 31 <li> <a href="#/">All</a> </li> | |
| 32 <li> <a href="#/active">Active</a> </li> | |
| 33 <li> <a href="#/completed">Completed</a> </li> | |
| 34 </ul> | |
| 35 <template if="{{app.hasCompleteTodos}}"> | |
| 36 <button id="clear-completed" on-click="{{clear}}"> | |
| 37 Clear completed ({{app.doneCount}}) | |
| 38 </button> | |
| 39 </template> | |
| 40 </footer> | |
| 41 </template> | |
| 42 </section> | |
| 43 <footer id="info"> | |
| 44 <p>Double-click to edit a todo.</p> | |
| 45 <p>Credits: the <a href="http://www.dartlang.org">Dart</a> team.</p> | |
| 46 <p> | |
| 47 This example was built using a pre-1.0 version of Polymer.dart. | |
| 48 Learn more about | |
| 49 <a href="https://www.dartlang.org/polymer-dart/">Polymer.dart</a> | |
| 50 or | |
| 51 <a href="https://code.google.com/p/dart/source/browse/branches/bleeding_ed
ge/dart/samples/third_party/todomvc/">view the source</a>. | |
| 52 </p> | |
| 53 <p>Part of <a href="http://todomvc.com">TodoMVC</a>.</p> | |
| 54 </footer> | |
| 55 </template> | |
| 56 <script type="application/dart" src="app.dart"></script> | |
| 57 </polymer-element> | |
| OLD | NEW |