KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have two objects that I want to render side by side. There is never a case where I will want to render more, or less than two. My model is setup like so: { obj1: {...}, obj2: {...} } Using mustache templates, I want to render each object using the same partial: <div> <h1>Object 1</h1> {{>objPartial}} </div> <div> <h1>Object 2</h1> {{>objPartial}} </div> However, mustache doesn't seem to support passing a context to the partial. Doing something like {{>objPartial obj1}} seems like it should be supported, but I can't find any documentation on setting a context for a partial. Is this sort of thing supported? If not, how can I accomplish the same effect without duplicating the partial ( objPartial1 and objPartial2 )?
Tags (comma-separated)
Save Edits
Cancel