AUR0821

Error Message

AUR0821: Invalid command "{{command}}" usage with [repeat.for] option "contextual". Only "bind" or static assignment is supported.

Where {{command}} is the binding command used on the repeat.for binding.

Description

This error occurs when using repeat.for="...; contextual" together with an unsupported binding command. With contextual, Aurelia only supports bind (two-way) or static assignment for the contextual bindings.

Example Trigger

<!-- ❌ Unsupported command with contextual -->
<div repeat.for="item of items; contextual: true; key.trigger: item.id">
  ${item.name}
</div>

Correct Usage

Use bind (or static assignment) for contextual bindings.

<!-- ✅ bind is supported -->
<div repeat.for="item of items; contextual: true; key.bind: item.id">
  ${item.name}
</div>

Troubleshooting

  • Check the binding command in the error ({{command}}) and change it to .bind (or remove the command for static assignment).

  • If you need event/listener behavior, move it to an element inside the repeater rather than the repeat.for declaration.

Last updated

Was this helpful?