I am passing an array object as a model to a jsrender template. I would like to render the model using:
{{for ~data}}
<div>{{>Name}}</div>
{{/for}}
However, the default behavior seems to be to render the template for each item of the array automatically. Any way to prevent that that doesn't require changing my data model?
You can simply wrap your model in an array. Here is a sample that does that:
Sample: Helpers, and layout templates (www.jsviews.com/#samples/jsr/helpers)