Exploring the possibilities of Tempo, a javascript templating engine that I am just starting to use. The documentation showcases iterating over arrays of objects or arrays, referencing property names (e.g. {{name}}) or array indexes (e.g. {{[0]}}) in the templates. However, what if I am looping through an array of simple types like strings? Is there a way to directly refer to the object itself within the template, perhaps using something like {{this}}?
For instance:
var data = [ "All", "Europe", "Asia", "America", "India"];
Tempo.prepare("locations").render(data);
Now, I aim to output my data into a list within a template:
<ul id="locations">
<li data-template>
{{?????}}
</li>
</ul>
How can I correctly reference individual array items as shown in the example above?