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