BorisMoore / jsrender

A lightweight, powerful and highly extensible templating engine. In the browser or on Node.js, with or without jQuery.
http://www.jsviews.com
MIT License
2.68k stars 340 forks source link

Update documentation for; #index and :#getIndex() #266

Closed numediaweb closed 9 years ago

numediaweb commented 9 years ago

I was searching the docs at http://www.jsviews.com/#jsrapi for a way to get the index of the iteration to use it in a select but couldn't find any helpful information.. It's just after looking at the code that I found it;

<option id="{@:#getIndex() @}" value="">{@:#index @}</option>

Please update the docs to let know that those helper functions exist :)

(or I'am missing something?)

BorisMoore commented 9 years ago

Thanks, you are right, and indeed there are quite a few APIs that are either undocumented or only documented indirectly via samples, and in some case via answers to question on the issues db (here) or on StackOverflow. I will be working on adding that content to the documentation very soon. My priority has been to get the code and APIs stabilized for the V1 release - which should be completed in the upcoming commit - then to work on docs before declaring the official V1.

getIndex() and get() are on my list...

BorisMoore commented 9 years ago

Closing, but putting under #251

BorisMoore commented 8 years ago

Added to docs here: http://jsviews.com/#viewobject@getIndex