From 2eb2d445db9821f0a5ce9c4b24becfec95a23675 Mon Sep 17 00:00:00 2001 From: Tyler Hendrickson <6372535+hendrickson-tyler@users.noreply.github.com> Date: Sat, 27 Jul 2024 17:58:00 -0600 Subject: [PATCH] docs: improve spelling and grammar for error NG0956 (#57164) PR Close #57164 --- adev/src/content/reference/errors/NG0956.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adev/src/content/reference/errors/NG0956.md b/adev/src/content/reference/errors/NG0956.md index b73875cf4cb..d57179df53f 100644 --- a/adev/src/content/reference/errors/NG0956.md +++ b/adev/src/content/reference/errors/NG0956.md @@ -1,6 +1,6 @@ # Tracking expression caused re-creation of the DOM structure. -The identity track expression specified in the `@for` loop caused re-creation of the DOM corresponding to _all_ items. This is very expensive operation that commonly occurs when working with immutable data structures, Example: +The identity track expression specified in the `@for` loop caused re-creation of the DOM corresponding to _all_ items. This is a very expensive operation that commonly occurs when working with immutable data structures. For example: ```typescript @Component({ @@ -25,13 +25,13 @@ export class App { } ``` -In the provided example the entire list, with all the views (DOM nodes, Angular directives, components, queries etc.) are re-created (!) after toggling the "done" status of items. Here a relatively inexpensive binding update to the `done` property would suffice. +In the provided example, the entire list with all the views (DOM nodes, Angular directives, components, queries, etc.) are re-created (!) after toggling the "done" status of items. Here, a relatively inexpensive binding update to the `done` property would suffice. -Apart from having high performance penalty, re-creating the DOM tree results in loss of state in the DOM elements (ex.: focus, text selection, sites loaded in an iframe etc.). +Apart from having a high performance penalty, re-creating the DOM tree results in loss of state in the DOM elements (ex.: focus, text selection, sites loaded in an iframe, etc.). ## Fixing the error -Change the tracking expression such that it uniquely identifies an item in a collection, regardless of its object identity. In the discussed example the correct track expression would use the unique `id` property (`item.id`): +Change the tracking expression such that it uniquely identifies an item in a collection, regardless of its object identity. In the discussed example, the correct track expression would use the unique `id` property (`item.id`): ```typescript @Component({