ember-cli-101-errata
ember-cli-101-errata copied to clipboard
Page 119: Tasks
On page 119, you have a tasks section which is difficult to understand. What I think that you mean is the following:
In the template, app/templates/articles/index.hbs add a checkbox
...
<th>Description</th>
<th>Notes</th>
<th>Borrowed since</th>
<th>{{input type="checkbox" checked=showReturned}}</th>
...
so that when checked, all articles are displayed otherwise just display borrowed.
...
<tbody>
{{#each itemController='articles/item'}}
{{if showReturned || model.state == 'borrowed' }}
<tr>...</tr>
{{/if}}
{{/each}}
</tbody>
...
Or do you mean just adding the query parameter to the route url like this:
/friends/604/articles?showReturned=1
Without giving away too much, of course.