Created
          February 4, 2014 05:57 
        
      - 
      
- 
        Save esparkman/8798794 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <body> | |
| <script type="text/x-handlebars" data-template-name="todos/index"> | |
| <ul id="todo-list"> | |
| {{#each itemController="todo"}} | |
| <li {{bind-attr class="isCompleted:completed isEditing:editing"}}> | |
| {{#if isEditing}} | |
| {{edit-todo class="edit" value=title focus-out="acceptChanges" insert-newline="acceptChanges"}} | |
| {{else}} | |
| {{input type="checkbox" checked=isCompleted class="toggle"}} | |
| <label {{action "editTodo" on="doubleClick"}}>{{title}}</label><button {{action "removeTodo"}} class="destroy"></button> | |
| {{/if}} | |
| </li> | |
| {{/each}} | |
| </ul> | |
| </script> | |
| <script type="text/x-handlebars" data-template-name="todos"> | |
| <section id="todoapp"> | |
| <header id="header"> | |
| <h1>todos</h1> | |
| {{input type="text" id="new-todo" placeholder="What needs to be done?" value=newTitle action="createTodo"}} | |
| </header> | |
| <section id="main"> | |
| {{outlet}} | |
| <input type="checkbox" id="toggle-all"> | |
| </section> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Todos.TodosIndexRoute = Ember.Route.extend({ | |
| model: function() { | |
| return this.modelFor('todos'); | |
| } | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment