# AUR0152

## Error Message

`AUR0152: Expression error: spread operator is not supported: "{{expression}}"`

Where `{{expression}}` is the expression containing the spread operator (`...`).

## Description

Aurelia’s binding expression parser does not support the JavaScript spread operator (`...`) inside template/binding expressions.

## Example Trigger

```html
<!-- ❌ Spread in binding expression -->
<div textcontent.bind="[...items].length"></div>
<button click.trigger="save(...args)"></button>
```

## Solution / Workarounds

* Move spread usage into view-model code (methods/getters).
* Use non-spread alternatives (for example `concat`, `slice`, or explicit arguments).

```ts
export class MyVm {
  items: unknown[] = [];

  get itemsCopy() {
    return this.items.slice();
  }

  saveAll(args: unknown[]) {
    return this.saveMany(args);
  }

  private saveMany(args: unknown[]) {/* ... */}
}
```

```html
<!-- ✅ Use view-model helpers -->
<div textcontent.bind="itemsCopy.length"></div>
<button click.trigger="saveAll(args)"></button>
```

## Troubleshooting

* Search your templates for `...` inside `${...}`, `.bind`, `.trigger`, `.delegate`, etc.
* Move spread expressions into view-model functions/getters.


---

# 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/0151-to-0179/aur0152.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.
