Exercise 3 - Rendering a Template in a Collection

In this exercise, we will be using Handlebars templates. We'll also render them with a collection.

Part 1

  1. Open index.html and find the template with id rolodex-template.
  2. Add an #each Handlebars block helper
  3. Inside of the #each helper, add Handlebars {{expressions}}.

Part 2

In the last exercise, we rendered a View of a Model. This time, we will render a View of a Collection.

  1. Open SpecRunner.html in a browser
  2. Click on Spec List on the upper-left hand corner.
  3. Make changes in src/app.js to make all the tests for Exercise 3 pass.

Bonus - Loop it different ways!

In the above exercises, we used a for loop within a Handlebars #each block. Try moving the loop into the .render() function of the view.