File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tools/manual_api_docs/blocks Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11The ` @for ` block repeatedly renders content of a block for each item in a collection.
22
3- @ syntax
3+ ## Syntax
44
55``` html
66@for (item of items; track item.name) {
@@ -10,7 +10,7 @@ The `@for` block repeatedly renders content of a block for each item in a collec
1010}
1111```
1212
13- @ description
13+ ## Description
1414
1515The ` @for ` block renders its content in response to changes in a collection. Collections can be any
1616JavaScript [ iterable] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols ) ,
@@ -19,7 +19,7 @@ but there are performance advantages of using a regular `Array`.
1919You can optionally include an ` @empty ` section immediately after the ` @for ` block content. The
2020content of the ` @empty ` block displays when there are no items.
2121
22- < h3 > track and objects identity </ h3 >
22+ ### ` track ` and objects identity
2323
2424The value of the ` track ` expression determines a key used to associate array items with the views in
2525the DOM. Having clear indication of the item identity allows Angular to execute a minimal set of DOM
@@ -33,7 +33,7 @@ For collections that remain static , `track $index` provides a straightforward t
3333collections experiencing additions, deletions, or reordering, opt for a
3434unique property of each item as the tracking key.
3535
36- < h3 > `$index` and other contextual variables </ h3 >
36+ ### ` $index ` and other contextual variables
3737
3838Inside ` @for ` contents, several implicit variables are always available:
3939
You can’t perform that action at this time.
0 commit comments