Transitioning back to Show All Todos Edit Page


Next we can update the application to allow navigating back to the list of all todos.

In index.html convert the <a> tag for 'All' todos into a Handlebars {{link-to}} helper:

1
2
3
4
5
6
7
8
9
10
11
<!--- ... additional lines truncated for brevity ... -->
<li>
  {{#link-to "todos.index" activeClass="selected"}}All{{/link-to}}
</li>
<li>
  {{#link-to "todos.active" activeClass="selected"}}Active{{/link-to}}
</li>
<li>
  {{#link-to "todos.completed" activeClass="selected"}}Completed{{/link-to}}
</li>
<!--- ... additional lines truncated for brevity ... -->

Reload your web browser to ensure that there are no errors. You should be able to navigate between urls for all, active, and completed todos.

Live Preview

Ember.js • TodoMVC

Additional Resources