Templates that are valid HTML are the right answer, unlike most templates which are string based because historically most server side templates have been string based (which I personally detest). No need for yet another template language!
I ended up writing my own pure HTML templates (templates implemented using cloning - super simple and fast), with declarative definitions written in JavaScript. Declarative definitions and events are linked to HTML nodes by data-nodename attributes within the template.
Comments
Templates that are valid HTML are the right answer, unlike most templates which are string based because historically most server side templates have been string based (which I personally detest). No need for yet another template language!
An example is http://batmanjs.org/ , and maybe most XML based templates too.
I ended up writing my own pure HTML templates (templates implemented using cloning - super simple and fast), with declarative definitions written in JavaScript. Declarative definitions and events are linked to HTML nodes by data-nodename attributes within the template.