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:
parent
4ceb865632
commit
617206bd1c
|
@ -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>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue