Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Angular reports NG0955 when an @for block’s track expression returns the same key for multiple items. Use a key that uniquely identifies each item—usually a stable property such as id or uuid—so Angular can associate each record with the right DOM view.
What NG0955 means
A track key tells Angular which rendered DOM view belongs to each item in an @for collection. NG0955 means at least two items produce the same key. The objects themselves may be different: the problem is that the chosen tracking expression does not distinguish them.
As an Amazon Associate I earn from qualifying purchases.
For example, two records can have different keys but share the same display value. Tracking by that repeated value creates a collision:
Free tools Windows power users keep installed
One-click scans. No signup required.
@for (item of items; track item.value) {
{{ item.value }}
}
Angular’s NG0955 guide demonstrates this issue with repeated values. With duplicate keys, Angular may associate a DOM node with the wrong same-key item while moving or destroying nodes. Angular also documents a reconciliation performance penalty because duplicate keys require more sophisticated, slower data structures.
#1 Best Overall
How to find and fix the duplicate key
-
Find the
@forblock named in the warning and inspect the expression aftertrack. -
Check the collection for repeated values in that expression. Names, statuses, categories, and display text often describe an item without uniquely identifying it.
-
Switch to a property that is unique for every item, such as
item.idoritem.uuid. If the data has no unique identifier, consider adding one.PerformanceWindows Errors? Fix Them Before They SpreadDriversCrashes, No Sound, or Screen Glitches?PerformancePC Slower Than It Used to Be?Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Check the entire collection again after updates. The tracking value must be unique among all items rendered at the same time.
For example, if key is unique while value may repeat, track by key:
@for (item of items; track item.key) {
{{ item.value }}
}
In Angular’s example, the repeated value causes the collision and the distinct key property is the correction.
Rank #4
Choose a tracking expression that fits the collection
The right key depends on whether items stay in place and whether the key continues to represent the same logical item as data changes. Angular’s @for API guidance and control-flow guide describe the available approaches.
Recommended Free Tools
| Collection or candidate | When it fits | What to check |
|---|---|---|
item.id, item.uuid, or another unique property |
Best fit for dynamic collections with insertions, deletions, or reordering | The value is unique for every rendered item and follows the same logical item across updates. |
$index |
A collection that never changes | Angular describes index tracking as straightforward for static collections. For changing collections, an index identifies a position, not the item that moves into or out of it. |
| Item reference identity | Only when no better tracking option is available | Angular cautions that tracking by object reference can make rendering updates significantly slower. |
NG0955 versus NG0956
NG0955 is specifically about multiple items producing the same key. NG0956 is a separate warning: tracking by object identity can cause Angular to recreate the DOM structure, often when immutable updates create new object instances for the same logical records. Angular’s NG0956 guide also recommends tracking with a unique property such as an ID.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




