Document @index in spacebars' README

This commit is contained in:
Slava Kim
2015-02-13 16:59:07 -08:00
parent bdb36f4f2e
commit fefd31a2cd

View File

@@ -365,6 +365,9 @@ for example), but it may also be a plain JavaScript array, `null`, or
An "else" section may be provided, which is used (with no new data
context) if there are zero items in the sequence at any time.
You can use a special variable `@index` in the body of `#each` to get the
0-based index of the currently rendered value in the sequence.
### Reactivity Model for Each
When the argument to `#each` changes, the DOM is always updated to reflect the