ember-cli-101-errata
ember-cli-101-errata copied to clipboard
Page 42: HTML for friends/index template changes without explanation
The list of friends in app/templates/friends/index.hbs
is initial built using a <ul>
like:
<h1>Friends Index</h1>
<h2>Total friends: {{model.length}}</h2>
<ul>
{{#each friend in model}}
<li>
{{link-to friend.fullName "friends.show" friend}}
</li>
{{/each}}
</ul>
In the "Deleting friends" section starting on page 42 the same template is shown using a table for the list:
<h1>Friends Index</h1>
<h2>Friends: {{model.length}}</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th></th>
</tr>
</thead>
<tbody>
{{#each friend in model}}
<tr>
<td>{{link-to friend.fullName "friends.show" friend}}</td>
<td><a href="#" {{action "delete" friend}}>Delete</a></td>
</tr>
{{/each}}
</tbody>
</table>
While this doesn't change the functionality, it's confusing that the html change isn't mentioned. Since this section is introducing a new link with a new action, it seems like it would be easier to follow if the markup change wasn't here too. Either starting with a table in the previous steps, or sticking with a list would be helpful.