# AUR0775

## Error Message

`AUR0775: Invalid command "<command>" usage with [repeat]`

Where `<command>` is the binding command used (e.g., `one-time`, `from-view`).

## Description

This error occurs when the `repeat.for` attribute uses a binding command other than the allowed ones: `bind` (two-way) or `to-view` (one-way).

## Cause

The `repeat` template controller inherently works by observing changes in the source collection (the iterable provided to `repeat.for`) and updating the generated DOM elements accordingly. This requires a one-way (`to-view`) or two-way (`bind`) data flow from the view model to the view.

Using other commands like `one-time` would prevent the repeater from updating when the collection changes, and `from-view` or `two-way` don't make conceptual sense for iterating a collection *from* the view model. The `Repeat` controller's constructor explicitly checks for and disallows unsupported commands.

## Solution

Ensure that your `repeat.for` binding uses either the default (which is `to-view`) or explicitly uses `.bind` or `.to-view`.

* `repeat.for="item of items"` (implicitly uses `to-view`)
* `repeat.for="item of items & toView"` (explicitly uses `to-view`)
* `repeat.for="item of items & bind"` (uses `bind`, though `to-view` is usually sufficient)

Remove any unsupported binding commands like `.one-time`, `.from-view`, or `.two-way`.

## Example

```html
<!-- Incorrect: Using one-time command -->
<div repeat.for="item of items & oneTime">${item}</div>

<!-- Incorrect: Using from-view command -->
<div repeat.for="item of items & fromView">${item}</div>

<!-- Incorrect: Using two-way command (though .bind is allowed, .two-way alias might not be) -->
<div repeat.for="item of items & twoWay">${item}</div>

<!-- Correct: Implicitly uses to-view -->
<div repeat.for="item of items">${item}</div>

<!-- Correct: Explicitly uses to-view -->
<div repeat.for="item of items & toView">${item}</div>

<!-- Correct: Uses bind -->
<div repeat.for="item of items & bind">${item}</div>
```

## Debugging Tips

* Inspect the `repeat.for` binding in your HTML template.
* Verify the binding command used after the expression (e.g., `& oneTime`, `& fromView`).
* Remove or change the command to `to-view` (or omit it) or `bind`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurelia.io/developer-guides/error-messages/runtime-html/aur0775.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
