Skip to content

Commit

Permalink
Display model data
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislopresto committed Mar 12, 2015
1 parent 2245381 commit 9dd594f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
3 changes: 3 additions & 0 deletions app/routes/todos.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Ember from 'ember';

export default Ember.Route.extend({
model: function() {
return this.store.find('todo');
}
});
18 changes: 6 additions & 12 deletions app/templates/todos.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@

<section id="main">
<ul id="todo-list">
<li class="completed">
<input type="checkbox" class="toggle">
<label>Learn Ember.js</label><button class="destroy"></button>
</li>
<li>
<input type="checkbox" class="toggle">
<label>...</label><button class="destroy"></button>
</li>
<li>
<input type="checkbox" class="toggle">
<label>Profit!</label><button class="destroy"></button>
</li>
{{#each todo in model}}
<li>
<input type="checkbox" class="toggle">
<label>{{todo.title}}</label><button class="destroy"></button>
</li>
{{/each}}
</ul>

<input type="checkbox" id="toggle-all">
Expand Down

0 comments on commit 9dd594f

Please sign in to comment.