Skip to content

Commit 617206b

Browse files
karamhevery
authored andcommitted
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 angular#589
1 parent 4ceb865 commit 617206b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/angular2/docs/core/01_templates.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ of the templates occurs. One such example is foreach.
378378
</form>
379379
<ul>
380380
<template foreach #person [in]="people" #i="index">
381-
<li>{{i}}. {{item}}<li>
381+
<li>{{i}}. {{person}}<li>
382382
</template>
383383
</ul>
384384
```
@@ -394,7 +394,7 @@ syntax is preferable.
394394

395395
```
396396
<ul>
397-
<li template="foreach; #person; in=people; #i=index;">{{i}}. {{item}}<li>
397+
<li template="foreach; #person; in=people; #i=index;">{{i}}. {{person}}<li>
398398
</ul>
399399
```
400400

@@ -404,7 +404,7 @@ which allows us to further shorten the text.
404404

405405
```
406406
<ul>
407-
<li template="foreach #person in people #i=index">{{i}}. {{item}}<li>
407+
<li template="foreach #person in people #i=index">{{i}}. {{person}}<li>
408408
</ul>
409409
```
410410

@@ -413,7 +413,7 @@ microsyntax for `foreach`.
413413

414414
```
415415
<ul>
416-
<li template="foreach: var person in people; var i=index">{{i}}. {{item}}<li>
416+
<li template="foreach: var person in people; var i=index">{{i}}. {{person}}<li>
417417
</ul>
418418
```
419419

0 commit comments

Comments
 (0)