May be a simple question, but it’s probably an unusual requirement.
Inside a template I can simply iterate through each of the models and everything works ok. eg:
{{#each model}}
<li>{{title}}</li>
{{/each}}
However, I have a particular layout where I need to use predefined slots for the model to appear. To do this i need to access the model array by index, I think this is possible in handlebars, but probably because model
is not a standard array I can’t seem to find a suitable solution. Here’s the concept that I would need to use…
<div class="slot1">
{{#with model.[0]}}
<h3>{{title}}</h3>
{{/with}}
</div>
Any ideas as to how to achieve this?