docs: Update variables to match example

It looks like the {{item}} variable in the examples should be {{person}}, as that is what has been exported (#person, etc).

It seems like the docs aren't finalized, but the discrepancy might confuse people coming in to learn from them in the meantime.

Closes #589
This commit is contained in:
Kara 2015-02-09 13:44:42 -08:00 committed by Misko Hevery
parent 4ceb865632
commit 617206bd1c
1 changed files with 4 additions and 4 deletions

View File

@ -378,7 +378,7 @@ of the templates occurs. One such example is foreach.
</form> </form>
<ul> <ul>
<template foreach #person [in]="people" #i="index"> <template foreach #person [in]="people" #i="index">
<li>{{i}}. {{item}}<li> <li>{{i}}. {{person}}<li>
</template> </template>
</ul> </ul>
``` ```
@ -394,7 +394,7 @@ syntax is preferable.
``` ```
<ul> <ul>
<li template="foreach; #person; in=people; #i=index;">{{i}}. {{item}}<li> <li template="foreach; #person; in=people; #i=index;">{{i}}. {{person}}<li>
</ul> </ul>
``` ```
@ -404,7 +404,7 @@ which allows us to further shorten the text.
``` ```
<ul> <ul>
<li template="foreach #person in people #i=index">{{i}}. {{item}}<li> <li template="foreach #person in people #i=index">{{i}}. {{person}}<li>
</ul> </ul>
``` ```
@ -413,7 +413,7 @@ microsyntax for `foreach`.
``` ```
<ul> <ul>
<li template="foreach: var person in people; var i=index">{{i}}. {{item}}<li> <li template="foreach: var person in people; var i=index">{{i}}. {{person}}<li>
</ul> </ul>
``` ```