pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/BodyCount/angular/commit/c38ea0767e507106bfb2b23bca538bc2ebc663e6

crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> docs: clarify that `@for` doesn't support break/continue (#59533) · BodyCount/angular@c38ea07 · GitHub
Skip to content

Commit c38ea07

Browse files
jelbournkirjs
authored andcommitted
docs: clarify that @for doesn't support break/continue (angular#59533)
We recently saw some confusion around this, so it's worth adding a sentence to clarify PR Close angular#59533
1 parent 3e31438 commit c38ea07

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

adev/src/content/guide/templates/control-flow.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ A typical `@for` loop looks like:
5050
}
5151
```
5252

53+
Angular's `@for` block does not support flow-modifying statements like JavaScript's `continue` or `break`.
54+
5355
### Why is `track` in `@for` blocks important?
5456

5557
The `track` expression allows Angular to maintain a relationship between your data and the DOM nodes on the page. This allows Angular to optimize performance by executing the minimum necessary DOM operations when the data changes.

tools/manual_api_docs/blocks/for.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ but there are performance advantages of using a regular `Array`.
1919
You can optionally include an `@empty` section immediately after the `@for` block content. The
2020
content of the `@empty` block displays when there are no items.
2121

22+
Angular's `@for` block does not support flow-modifying statements like JavaScript's `continue` or `break`.
23+
2224
### `track` and objects identity
2325

2426
The value of the `track` expression determines a key used to associate array items with the views in

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy