Skip to content

Instantly share code, notes, and snippets.

@wmill
Created March 26, 2013 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmill/5246511 to your computer and use it in GitHub Desktop.
Save wmill/5246511 to your computer and use it in GitHub Desktop.
<section id="todoapp">
<header id="header">
<h1>todos</h1>
{{view Ember.TextField id="new-todo" plaseholder="What needs to be done?" valueBinding="newTitle" action="createTodo"}}
</header>
{{#if length}}
<section id="main">
<ul id="todo-list">
{{#each filteredTodos itemController="todo"}}
<li {{bindAttr class="isCompleted:completed isEditing:editing"}}>
{{#if isEditing}}
{{view Todos.EditTodoView todoBinding="this"}}
{{else}}
{{view Ember.Checkbox checkedBinding="isCompleted" class="toggle"}}
<label {{action "editTodo" on="doubleClick"}}>
{{title}}
</label>
<button {{action "removeTodo"}} class="destroy"></button>
{{/if}}
</li>
{{/each}}
</ul>
{{view Ember.Checkbox id="toggle-all" checkedBinding="allAreDone"}}
</section>
<footer id="footer">
<span id="todo-count">{{{remainingFormatted}}}</span>
<ul id-"filters">
<li>
{{#linkTo todos.index activeClass="selected"}}
All
{{/linkTo}}
</li>
<li>
{{#lintTo todos.active activeClass="selected"}}
Active
{{/linkTo}}
</li>
<li>
{{#linkTo todos.completed activeClass="selected"}}
Completed
{{/linkTo}}
</li>
</ul>
{{#if hasCompleted}}
<button id="clear-completed" {{action "clearCompleted"}}
{{bindAttr class="buttonClass:hidden"}}>
Clear completed ({{completed}})
</button>
{{/if}}
</footer>
{{/if}}
</section>
<footer id="info">
<p>Double-click to edit a todo</p>
<p>Created by
Tom Dale, Addy Osmani
</p>
<p>Part of TodoMVC</p>
</footer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment