> For the complete documentation index, see [llms.txt](https://docs.aurelia.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aurelia.io/developer-guides/error-messages/runtime-html/aur0803.md).

# AUR0803

## Error Message

`AUR0803: "& updateTrigger" invalid usage. This binding behavior can only be applied to two-way/ from-view bindings.`

## Description

This error occurs when the `& updateTrigger` binding behavior is applied to a binding expression that is not a two-way (`.bind`) or from-view (`.from-view`) binding.

## Cause

The `& updateTrigger` binding behavior modifies *when* the view model is updated based on changes in the view (specifically, by listening to DOM events on the target element). This concept only applies to bindings that transfer data *from* the view *to* the view model.

These binding types are:

* **Two-way (`.bind`):** Data flows in both directions (view-to-model and model-to-view).
* **From-view (`.from-view`):** Data flows only from the view to the model.

Applying `& updateTrigger` to other binding types, such as:

* One-way (`.to-view`)
* One-time (`.one-time`)
* String interpolation (`${}`)
* Event bindings (`.trigger`, `.capture`)
* Reference bindings (`ref`) is invalid because these bindings do not inherently update the view model based on view changes, rendering the `updateTrigger` behavior meaningless in these contexts.

## Solution

1. **Apply Only to `.bind` or `.from-view`:** Ensure that `& updateTrigger` is only used with the `.bind` or `.from-view` binding commands.
2. **Remove from Other Bindings:** If `& updateTrigger` has been applied to an incompatible binding type, remove it.
3. **Choose Correct Binding Mode:** If you intended to update the view model based on view events, ensure you are using `.bind` or `.from-view` as the binding command.

## Example

```html
<!-- Incorrect: Applying updateTrigger to .to-view -->
<span textcontent.to-view="statusMessage & updateTrigger:'mousemove'"></span>

<!-- Incorrect: Applying updateTrigger to .one-time -->
<img src.one-time="imageUrl & updateTrigger:'load'">

<!-- Incorrect: Applying updateTrigger to .trigger -->
<button click.trigger="save() & updateTrigger:'mousedown'">Save</button>

<!-- Correct: Applying updateTrigger to .bind -->
<input type="text" value.bind="username & updateTrigger:'blur'">

<!-- Correct: Applying updateTrigger to .from-view -->
<select value.from-view="selectedOption & updateTrigger:'change'">
  <!-- options -->
</select>
```

```typescript
// View Model
import { customElement } from 'aurelia';

@customElement({ /* ... */ })
export class MyComponent {
  statusMessage = 'Ready';
  imageUrl = 'logo.png';
  username = 'user';
  selectedOption = '';

  save() { /* ... */ }
}
```

## Debugging Tips

* Check the binding command used immediately before the property name in the binding expression (e.g., `value.bind`, `textcontent.to-view`).
* Ensure the command is either `.bind` or `.from-view` when using `& updateTrigger`.
* Review why you added `& updateTrigger` to the binding. If it wasn't intended for a two-way or from-view scenario, it's likely unnecessary.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
