Seems the problem is that you put the Backbone model directly into your template, but you have to convert it into a JSON object first using model.toJSON()
. Or you try to access author.attributes.name
.
From the docs:
Handlebars also supports nested paths, making it possible to look up properties nested below the current context.
<div class="entry">
<h1>{{title}}</h1>
<h2>By {{author.name}}</h2>
<div class="body">
{{body}}
</div>
</div>
That template works with this context
var context = {
title: "My First Blog Post!",
author: {
id: 47,
name: "Yehuda Katz"
},
body: "My first post. Wheeeee!"
};