premasagar / tim

A tiny, secure JavaScript micro-templating script.
251 stars 26 forks source link

Allow passing arrays into data attribute #15

Open darsain opened 11 years ago

darsain commented 11 years ago

Example:

var template = '<li>{{name}}</li>\n';
var data = [
    { name: 'John' },
    { name: 'Billy' }
];
tim(template, data);

Would return:

<li>John</li>
<li>Billy</li>
premasagar commented 11 years ago

@darsain, that's a good idea.

stela5 commented 11 years ago

+1