BorisMoore / jquery-tmpl

The original official jQuery Templates plugin. This project was maintained by the jQuery team as an official jQuery plugin. It is no longer in active development, and has been superseded by JsRender.
3.23k stars 1.01k forks source link

Support for $index in {{tmpl}} #51

Closed enyim closed 13 years ago

enyim commented 13 years ago

Code:

$.tmpl("[${$index} -- ${$data}]", [10, 20, 30]).appendTo($("body"))

Prints:

[0 -- 10][1 -- 20][2 -- 30]
clarkbox commented 13 years ago

i think this is a dup. see issue: https://github.com/jquery/jquery-tmpl/issues#issue/28

patch: https://github.com/clarkbox/jquery-tmpl/commit/993e6fa128c5991723316032abe12ff0cbbb9805

BorisMoore commented 13 years ago

Yes, closing as dup. https://github.com/jquery/jquery-tmpl/issues#issue/28