AUR0776
Error Message
AUR0776: Invalid [repeat] usage, found extraneous target "<target>"
Where <target>
is the property name that the repeat
attribute was incorrectly bound to (e.g., repeat.items
, repeat.foo
).
Description
This error occurs when you try to bind the repeat
attribute to a target property other than for
. The correct syntax is always repeat.for
.
Cause
The repeat
template controller is designed to work specifically with the for
property to receive the iteration expression (e.g., item of items
, i of count
). Binding repeat
to any other property name (like repeat.items
, repeat.data
, etc.) is syntactically incorrect because the controller doesn't expect or handle targets other than for
. The Repeat
controller's constructor validates this during initialization.
Solution
Ensure your repeat attribute binding uses the correct target property for
.
Change any incorrect bindings like repeat.items="..."
or repeat.whatever="..."
to repeat.for="..."
.
Example
<!-- Incorrect: Binding repeat to 'items' instead of 'for' -->
<div repeat.items="item of userList">${item.name}</div>
<!-- Incorrect: Binding repeat to 'list' instead of 'for' -->
<div repeat.list="product of products">${product.id}</div>
<!-- Correct: Using repeat.for -->
<div repeat.for="item of userList">${item.name}</div>
<!-- Correct: Using repeat.for -->
<div repeat.for="product of products">${product.id}</div>
Debugging Tips
Carefully examine the
repeat
attribute binding in your HTML template.Make sure it explicitly says
repeat.for
, notrepeat.<anything_else>
.Correct the target property name to
for
.
Last updated
Was this helpful?