Loops in HTML Templates (like Angular, React, ...)

Hi everybody,

I'm looking for a way to create the HTML-part of my Shiny Apps with HTML-Files. Using this works fine:


But I'd like to give my HTML-Template lets say a list of names and inside of the HTML, I want to output these names.

htmlTemplate("somwhere/freshcomponent.html", coolThings = c("aThing", "anotherThing", "aThirdThing"))

I imagine something like this, but can't find a way to make it work

{{for(thing in coolThings) { }}
<span class="fantastic-styling">{{thing}}</span>
{{ } }}

Is there a way to make it work? Is there maybe kind of a reference of what I can do inside of a HTML-Template? Like everything, what Shiny puts on top of plain HTML?

Thanks and best Regards,

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.