I'm surprised that the "nothing complex / hack up a quick prototype" recommendation is Angular. I get that it's powerful, but there's so much deep magic inside angular [1] that I find even simple stuff takes significant forethought and wrangling.
As a substitute, why not Ractive.js? It's simple and does what you'd expect. You put
{{#each foo:i}}
<span class="{{classname}}"> {{foo[i]}} </span>
{{/each}}
in one place, and ractive.set({
foo: ['a', 'b', 'c'],
classname: "output",
})
in another, and things just work. No messing with insanity like: angular.element(myDomElement).scope().$apply();
/rant. Maybe I'm missing something deep here.[1] Introspecting the parameter names of the callback function I passed in? Really?