In this exercise, we will be using Handlebars
templates. We'll also render them with a collection.
index.html
and find the template with id rolodex-template
.#each
Handlebars block helper#each
helper, add Handlebars {{
expressions}}
.
{{firstName}}
and {{lastName}}
. Feel free to stick to the attributes given, or switch it up.In the last exercise, we rendered a View of a Model. This time, we will render a View of a Collection.
SpecRunner.html
in a browsersrc/app.js
to make all the tests for Exercise 3 pass.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.